I am trying to write a python script that divides two numbers and then stores the value of the first digit after the decimal point but first I want to print the answer of the division. example: 31/7 should be 4,428 but when I use
def spiel():
anzahl=int(raw_input("Anzahl der Spieler"))
spieler=int(raw_input("Jeder wievielte spielt"))
if anzahl>0 and spieler>0:
#Quotient berechnen
q=anzahl/spieler
print '%.2f'%q
I get the answer 4.00, what have I done wrong.
If you could tell me how I can store the first decimal point after the decimal point THAT WOULD BE AMAZING! Thanks in advance