You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.1 KiB
Python
80 lines
1.1 KiB
Python
from random import randint
|
|
value1 = randint(1,10)
|
|
value2 = randint(1,10)
|
|
|
|
#Challenge 1
|
|
answer1 = value1 * value2
|
|
print("What is " + str(value1) + " time " + str(value2) + "\n",answer1)
|
|
|
|
#Challenge 2
|
|
answer2 = value1 + value2
|
|
print("What is " + str(value1) + " plus " + str(value2) + "\n",answer2)
|
|
|
|
|
|
|
|
#Challenge 3
|
|
print("What is", value1, "times" , value2)
|
|
user_input = int(input("type your answer "))
|
|
|
|
if value1 * value2 == user_input:
|
|
print(user_input , "Is correct")
|
|
|
|
elif value1 * value2 != user_input:
|
|
print(user_input , "Is not correct")
|
|
|
|
#Challlenge 4
|
|
repeatNumber = randint(5,50)
|
|
for numbers in range(5):
|
|
print("your output is ",numbers)
|
|
|
|
|
|
|
|
#Challenges 5:
|
|
print("What is", value1, "times" , value2)
|
|
print("What is", value1, "times" , value2)
|
|
user_input = int(input("type your answer "))
|
|
|
|
if value1 * value2 == user_input:
|
|
print(user_input , "Is correct")
|
|
|
|
elif value1 * value2 != user_input:
|
|
print(user_input , "Is not correct")
|
|
print("The correct answer is ",value1*value2)
|
|
|
|
|
|
#Challenges 6 coming soon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|