Created
October 1, 2020 14:09
-
-
Save Irene-123/cb1be7026fbd15edeac63a46d76e92a8 to your computer and use it in GitHub Desktop.
Guess the coin Project-Automate the boring stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
guess='' | |
while guess not in ('head','tail'): | |
print('Guess the coin Toss ! heads or tails ?!') | |
guess=input() | |
toss=random.randint(0,1) | |
if toss: | |
tt='head' | |
else: | |
tt='tail' | |
if tt==guess: | |
print("Yeah! You guessed it right ! ") | |
else: | |
print('Nope! Guess again!') | |
guess=input() | |
if tt==guess: | |
print("Yes ! You got it !") | |
else: | |
print("You're too bad at it , huh?") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment