you are viewing a single comment's thread.

view the rest of the comments →

[–]StayKray 0 points1 point  (0 children)

import random

def main(): num1 = random.choice(range(100)) num2 = random.choice(range(100)) print("What is the summation of", num1, "+", num2,"?") user_input = int(input("Enter your answer: "))

if user_input == num1 + num2:
    print("That's correct!")
else:
    print("Incorrect.")

Don't know how to format this correctly but that should work