diff --git a/Guessing_number_game.py b/Guessing_number_game.py new file mode 100644 index 0000000..b06f3a3 --- /dev/null +++ b/Guessing_number_game.py @@ -0,0 +1,34 @@ +import random as rd +s="*"*10 +i=1 +print(s,"welcome to number guessing game",s) +print("computer is ready to choose a number") +C=rd.randint(1,100) + +print("Are you ready to guess that number") +print("if yes \n Enter 1 \n if No \n Enter 2") +x=int(input()) +if x==1: + print("NOTE: you have only 5 chances to guess the number") + print("ALL THE BEST!!!") + while i<=5: + y=int(input("enter your number")) + if C==y: + print(s,"Hurray!!! you got the number",s) + i==5 + elif C>y: + print("You guessed a number which is less than the Computer number") + i+=1 + elif C