Skip to content

Commit fb0648b

Browse files
authored
changed the name of the function and variables
functions can be more readable and the variables as well and now it looks more understandable :)
1 parent deb461e commit fb0648b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Guess_the_number_game

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ def new_game():
1010
print("new game")
1111

1212

13-
def range100():
13+
def range_of_100():
1414
global num
1515
num = random.randrange(0,100)
16-
print("range is 0-100")
16+
print("your range is 0-100")
1717

18-
def range1000():
18+
def range_of_1000():
1919
global num
2020
num = random.randrange(0,1000)
2121
print("range is 0-1000")
2222

2323
def input_guess(guess):
2424
global num
25-
print("Guess is " + guess)
26-
n1 = int(guess)
27-
if n1 == num:
25+
print("Your Guess is " , guess)
26+
num1 = int(guess)
27+
if num1 == num:
2828
print ("Correct")
29-
elif n1 >= num:
29+
elif num1 >= num:
3030
print ("Greater")
31-
elif n1 <= num:
31+
elif num1 <= num:
3232
print ("Lower")
3333

3434

0 commit comments

Comments
 (0)