Created
June 10, 2023 14:47
-
-
Save horstjens/4d595744093126e98f53c71ca47b8154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
zahl1 = random.randint(1,15) | |
zahl2 = random.randint(1,15) | |
startzeit = time.time() | |
while True: | |
print(f"Wieviel ist {zahl1*zahl2} / {zahl2} ?") | |
antwort = input(">>>") | |
if antwort == str(zahl1): | |
break | |
print("falsch!") | |
dauer = time.time() - startzeit | |
print(f"richtig! du hast {dauer:.2f} Sekunden gebraucht") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment