From fb0648b55dd0d42574a9cc28fc96c31a40e81a52 Mon Sep 17 00:00:00 2001 From: Babar Zaman <37775042+Babar404@users.noreply.github.com> Date: Sun, 30 Dec 2018 20:10:37 +0500 Subject: [PATCH] changed the name of the function and variables functions can be more readable and the variables as well and now it looks more understandable :) --- Guess_the_number_game | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Guess_the_number_game b/Guess_the_number_game index d535643cfc2..0b62190690d 100644 --- a/Guess_the_number_game +++ b/Guess_the_number_game @@ -10,25 +10,25 @@ def new_game(): print("new game") -def range100(): +def range_of_100(): global num num = random.randrange(0,100) - print("range is 0-100") + print("your range is 0-100") -def range1000(): +def range_of_1000(): global num num = random.randrange(0,1000) print("range is 0-1000") def input_guess(guess): global num - print("Guess is " + guess) - n1 = int(guess) - if n1 == num: + print("Your Guess is " , guess) + num1 = int(guess) + if num1 == num: print ("Correct") - elif n1 >= num: + elif num1 >= num: print ("Greater") - elif n1 <= num: + elif num1 <= num: print ("Lower")