-
Notifications
You must be signed in to change notification settings - Fork 1
/
TheColorGuessingGame
36 lines (26 loc) · 966 Bytes
/
TheColorGuessingGame
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
This is a mini project but it is important for an understanding the guessing games
"""
print(" Welome to the Color Guessing Game: ")
color = "white"
Player_Color = str(input(" Please predict from the basis color: "))
chance = 2
while True:
if chance !=0:
if Player_Color != color:
chance -= 1
print(" You have {} chance left.".format(chance))
Player_Color = str(input(" Predict from the basis color and please be more careful: "))
elif Player_Color != color:
chance -= 1
print(" You have {} chance left".format(chance))
Player_Color = str(input(" Please predict from the basis color: "))
elif (chance == 0) and (Player_Color != color):
print("Game Ower!")
break
if Player_Color == color:
print("Congrats, you're awesome!")
break
if chance ==0:
print("Game Ower")
break