# Pythons Games of Chance

Hi all

Im currently working on the games of chance project, and ive finished my code up to a certain extent, but id like for a user input prompt to appear instead of having to type the game functions in the code itself and defining whether or not its heads or tails, however when it prompts the user for input, and how much they would like to bet, nothing happens and the process finishes, im assuming its because it is not linked together somehow but im unsure on how to do that?

``````import random

money = 100

#Functions for the actual game are here
def coin_flip(guess, bet):
side = random.randint(1, 2)
if guess == "Heads" and side == 1:
total_money = money + bet
print(int(bet))
print("Heads, you won! Your total money is now " + str(money + bet))
if guess == "Tails" and side == 2:

total_money = money + bet
print(int(bet))
print("Tails, you won! Your total money is now " + str(money + bet))
else:
total_money = money - bet
print(int(-bet))
print(("You lost! Your total is now ") + str(money - bet) + ".")

# Game functions are called here
coin_flip = input("What side of the coin would you like to guess? ")
type(coin_flip)
bet = input("How much would you like to bet? ")
type(coin_flip)
``````

Well I donâ€™t see how you are passing the inputs into the function.
I havenâ€™t done python yet but I have experience in javascript.

Seems to me you need something like this:

``````side = input("What side of the coin would you like to guess? ")
amount = input("How much would you like to bet? ")
``````

And then invoke the function coin_flip

``````coin_flip(side, amount)
``````

Hello, @course5641557636.

In the Codecademy learning environment, you unfortunately canâ€™t get user input in this project. If you are doing it offsite, as @janneslohmeijer said, youâ€™ll need to invoke your function with the arguments youâ€™ve retrieved from the user. You will run into an issue with your current code. You have a function named `coin_flip`, but youâ€™ve re-used that name for a user `input` value, so what will happen when you try to invoke `coin_flip(coin_flip, bet)`?