Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python Online

import random   
diceroll=random.randint(1,6)
print random.randint(1,6) 

hi4 = print("loser")
hi6 = print("win")
hi7 = print("win")
hi8 = print("win")
hi9 = print("win")
hi0 = print("bonus win")

if dice roll is 1:
    print hi4
    
elif dice roll is 2:
    print hi6

elif dice roll is 3: 
    print hi7

else dice roll is 4: 
    print hi8

else dice roll is 5: 
    print hi9
    
else dice roll is 6: 
    print hi0

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.