Sorry for what’s likely something basic I’m missing here but I’ve come unstuck on the very 1st project (hopefully I’m not alone).
I’ve tried various ways of amending the code to get it to print what I want and can’t seem to get it to work.
I’ve imported it below but I basically want the programme to print out the users guess and stake, how much they won i.e. the bet and then their new total.
Any guidance on this would be massively appreciated, I’ve been sitting staring at the laptop for some time now trying to unpick it!
PS I’ve only just finished module 3 so I’m quite early in to the course…
import random num = random.randint(1, 2) money = 100 #Write your game of chance functions here def coin_flip(guess, bet): if guess == "Heads" and num == 1: return (money + bet) elif guess == "Tails" and num == 2: return (money + bet) else: return (money - bet) return print("Your guess was " + guess + " and your stake was " + str(num) + " . You won " + str(bet) + "!" + " Your new total is " + str(money)) #Call your game of chance functions here coin_flip("Heads", 50)