#Imports--------------------------------------------------------------------------------- import time import random #Imports--------------------------------------------------------------------------------- #Define---------------------------------------------------------------------------------- def s(): time.sleep(2) #Define---------------------------------------------------------------------------------- #Variables------------------------------------------------------------------------------- card1 = 0 card2 = 0 cardhit = 0 hit = "" stand = "" choose = "" moneywon = 0 moneytotal = 0 total = 0 bust = "" #Variables------------------------------------------------------------------------------- #StarterStrings-------------------------------------------------------------------------- play = input("Do you like illegal gambling? [y/n]: ") if play == "y": print("You have 100 dollars to spend") while total < 21 and play == "y": card1 = random.randint(1,11) card2 = random.randint(1,11) s() print("Your first given card is a", card1) s() print("Secondly you get a", card2) s() total=card1+card2 if total < 21: print("Your total is", total) s() print("You now may have the choice of [h]itting") s() print("Or you may rather choose to [s]tand") s() choose = input("Choose [h/s] : ") if choose == "h": s() cardhit = random.randint(1,11) print("You got a", cardhit) s() total += cardhit print("Your total is", total) cardhit = 0 if play != "y": print("Okay bye then.") #StarterStrings--------------------------------------------------------------------------