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.
49 lines
862 B
Python
49 lines
862 B
Python
from gasp import *
|
|
from random import randint
|
|
|
|
#Challenge 6 & 7
|
|
showingnumber1 = randint(1,100)
|
|
showingnumber2 = randint(1,100)
|
|
print("What number can be added to " + str(showingnumber1) + " to give you 100")
|
|
user_input = int(input(""))
|
|
if user_input + showingnumber1 < 100:
|
|
print("value is small")
|
|
|
|
elif user_input + showingnumber1 == 100:
|
|
print("value is equal")
|
|
|
|
else:
|
|
print("value is big")
|
|
|
|
|
|
#Challenges 8
|
|
value1 = randint(2,50)
|
|
value2 = randint(2,50)
|
|
print("What is " + str(value1) + " times " + str(value2))
|
|
user_input2 = int(input(""))
|
|
if value1 * value2 == user_input2:
|
|
print("yes")
|
|
|
|
else:
|
|
print("no")
|
|
|
|
#Challenges 9
|
|
win1 = randint(1,10)
|
|
win2 = randint(11,20)
|
|
win3 = randint(21,30)
|
|
print("Repeat this three time")
|
|
winners = str(win1) + " " + str(win2) + " " + str(win3)
|
|
for winner in winners:
|
|
print(winner)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|