From 43a9f0eb031d680bbce2e6b6927c42e5b8fb1302 Mon Sep 17 00:00:00 2001 From: Milind Bajaj <47417183+milindbajaj@users.noreply.github.com> Date: Tue, 6 Oct 2020 15:09:42 +0530 Subject: [PATCH 1/2] Update Greater Number --- Greater Number | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Greater Number b/Greater Number index e77c480..ff63ed4 100644 --- a/Greater Number +++ b/Greater Number @@ -1,5 +1,8 @@ # Python program to find the greatest of two numbers using the built-in function +#Take input from user num1 = int(input("Enter the first number: ")) num2 = int(input("Enter the second number: ")) + +#Compare the inputs with max() function and print result print(max(num1, num2), "is greater") From 603879f2a4af112ed2a9a1eaeb73531bc00b0dee Mon Sep 17 00:00:00 2001 From: Milind Bajaj <47417183+milindbajaj@users.noreply.github.com> Date: Tue, 6 Oct 2020 15:16:01 +0530 Subject: [PATCH 2/2] Update Guess the no --- Guess the no | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Guess the no b/Guess the no index da00477..7be5836 100644 --- a/Guess the no +++ b/Guess the no @@ -1,6 +1,14 @@ +#Simple Python Guessing Number Game + +#select variable n value as per your choice n=20 + +#Intialize these to 1 number_of_guesses=1 + print("Number of guesses is limited to 9 times: ") + +#While Loop that checks input value and print result while (number_of_guesses<=9): guess_number=int(input("Guess the no :\n")) if guess_number<20: @@ -14,4 +22,4 @@ while (number_of_guesses<=9): print(9-number_of_guesses, "number of guesses left") number_of_guesses = number_of_guesses + 1 if(number_of_guesses>9): - print("Game Over") + print("Game Over"