How to use the Mathematical operations in my Array inside my Random Quiz Python 3, I want to use all the operations in my array in that order -


this maths quiz, problem is i want use operations in array in order. code far:

import random import time rand1= 0 rand2= 0 name = input("what name?")#asks user name print("welcome small maths test",name,"have fun , luck!")#welcomes user name whith name 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 number if questions asked more 10     question = rand1 random.choice(operation) rand2 

i able follow operations list 10 times while numbers being randomly generated.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -