Here is a python program about operators i have been working on since a week, I need someone to help me

Published: 14/01/2020
Here is a python program about operators i have been working on since a week, I need someone to help me
Source: STACKOVERFLOW.COM

import operator import random # these modules will help with the random picking of operators ops = {"+": operator.add, "-": operator.sub} a = ["+", "-"] #this is to do the random.choice() function b = float(ops[random.choice(a)](0, 1)) #these can only take 2 parameters, don't ask me why c = float(ops[random.choice(a)](2, 3)) d = float(ops[random.choice(a)](4, 5)) e = float(ops[random.choi

Read more
Related news
Comment
FACEBOOK