mercredi 30 septembre 2020

Not showing the "print('yes')" statement

def subtract1(a, b):
    return a - b
    if random.randint(0,100) < 99:
        print("Yes")
print(subtract(20, 10)

I have tried many different ways of using a random number gen but can't seem to find one that works. I am now quite sure that it has to do something with the other code but I'm not sure what.




Aucun commentaire:

Enregistrer un commentaire