From 108c03adbd92f795abbf62454b5adb5873a01068 Mon Sep 17 00:00:00 2001 From: vivekkrsk <86180566+vivekkrsk@users.noreply.github.com> Date: Mon, 7 Mar 2022 06:51:08 +0530 Subject: [PATCH] commit --- guess_nmber_one_time.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 guess_nmber_one_time.py diff --git a/guess_nmber_one_time.py b/guess_nmber_one_time.py new file mode 100644 index 0000000..a323149 --- /dev/null +++ b/guess_nmber_one_time.py @@ -0,0 +1,16 @@ +import random + +number = random.randint(0,100) + +print("Guess a magic number between 1 to 100") + +guess = eval(input("Enter your guess: ")) + +if guess == number: + print("Yes, the number is",number) +elif guess > number: + print("Your guess is too high") +else: + print("Your guess is too low") + +print("Correct guess is",number) \ No newline at end of file