Skip to content
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?

You are viewing a single comment. View All
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 :)