加法运算,我9岁的孩子试图向我的算盘随机数的数学自动化。我要生成随机数,然后做对他们
我想随机生成值,并将其存储在内存中供以后,当我按下检查加法。那么它应该给出所有随机数的附加值。
到目前为止,我有这样的代码
# my abacus training app
import random
import time
print ('hey what\'s your name')
name = input()
print("well today i am goingto ask abacus questions ")
print ("choose a level")
levelOne = print ("level 1")
print (levelOne)
choice = input()
if choice.endswith("1") :
print("let's start")
noone = random.randint(1,10)
print (noone)
time.sleep(5)
notwo = random.randint(1,10)
print (notwo)
time.sleep(5)
nothree = random.randint(1,10)
print (nothree)
time.sleep(5)
nofour = random.randint(1,10)
print (nofour)
time.sleep(5)
nofive = random.randint(1,10)
print (nofive)
time.sleep(5)
=======我张贴以上问题的最终答案,这是我最后的代码,感谢SRIG和哈米德Temsah用于输入==感谢所有支持我的人。
# my abacus training app
import random
import time
print ('hey what\'s your name')
name = input()
print("well today i am goingto ask abacus questions ")
print ("choose a level")
choice = input("choose a level : ")
if choice.endswith("1") :
print("let's start")
noone = random.randint(1,10)
print (noone)
time.sleep(10)
notwo = random.randint(1,10)
print (notwo)
time.sleep(10)
nothree = random.randint(1,10)
print (nothree)
time.sleep(10)
nofour = random.randint(1,10)
print (nofour)
time.sleep(10)
nofive = random.randint(1,10)
print (nofive)
time.sleep(10)
print ("click enter to check your ans")
input()
print(noone+notwo+nothree+nofour+nofive)
什么是您收到的错误或问题,您所面对? – Ajax1234
你想用这条线做什么? 'levelOne = print(“level 1”)' – RottenCandy
和PyGame在你的问题在哪里?你为什么设置标签'pygame'? – furas