Skip to content

Instantly share code, notes, and snippets.

@alex-ber
Created September 7, 2022 19:30
Show Gist options
  • Save alex-ber/3bfd3b0eb3fc35e6e421c389fc841165 to your computer and use it in GitHub Desktop.
Save alex-ber/3bfd3b0eb3fc35e6e421c389fc841165 to your computer and use it in GitHub Desktop.
01_import1.py
from random import randint as randomInt
first=randomInt(1, 9)
second=randomInt(1, 9)
result=first+second
answer_str = input(f"How much is {first} + {second} ? ")
answer = int(answer_str)
if result==answer:
print("You're right!")
else:
print("Sorry, you're wrong.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment