Skip to content
← Back to Community
arrays
Profile icon
samhandler478

symbol = ["+","-","/","*"]

if level == 1:
levelonea = random.randint(0,10)
leveloneb = random.randint(0,10)
answerone = int(input(levelonea, symbol(0,3), leveloneb))
How do i make python chose a random symbole from the above array?

Answered by ArchieMaclean [earned 5 cycles]
View Answer
Voters
Profile icon
ellabailliee
Profile icon
samhandler478
Comments
hotnewtop
Profile icon
ArchieMaclean

choose a random item from an array using the following:

import random random_item = random.choice(symbol)

Please upvote if this helps :)