Hi,

I am working on the coin flip game function on the basic requirements. When i try to run the code below I get an error saying that randint is not defined. But it is a function isn’t it? the same way we dont need to define print. Pls help. Also if there are any other problems or improvements to be made to achieve the basic requirements. This is the link to the question Computer Science Independent Project #1 – Coin Flip

```
print("Welcome, you are about to guess the outcome of a coin flip")
choice = ""
def coin_flip(choice):
num = randint(1, 2)
# if coin is heads or tails
if num == 1:
print("Heads")
if num == 2:
print("Tails")
# if heads or tails is guessed
if num == 1 and choice == "Heads":
print("Heads! You guessed right.")
elif num == 2 and choice == "Tails":
print("Tails! You guessed right.")
else:
print("Sorry, that was the wrong guess.")
#x = input("Enter your guess: " + str(choice))
coin_flip("Heads")
Blockquote
```