这是我的数学测验,我的问题是我想按顺序使用我的数组中的所有操作。到目前为止,这是我的代码:
import random
import time
Rand1= 0
Rand2= 0
name = input("What is your name?")#Asks the user for their name
print("Welcome to a small maths test",name,"have fun and good luck!")#Welcomes the user with the name whith the name which they have input
def Question():
QuestionsAsked = 0
operation = ["+","+","+","+","-","-","-","*","*","*"]
Addscore = 0
Rand1 = random.randint(5,10)#First Random Number
Rand2 = random.randint(1,5)#Second Random Number
while QuestionsAsked < :#Checks if the number if questions asked is more than 10
question = Rand1 random.choice(operation) Rand2
我希望能够在数字随机生成的情况下完全按照我的操作列表进行10次。