Skip to content

Commit a98c446

Browse files
authored
Update numbergame.py
Added different dificulties
1 parent 40bec80 commit a98c446

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

numbergame.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import random
22
import time
33

4-
number = random.randint(1, 100)
4+
dif = 100
5+
#Change the value of dif to change the difficulty!
6+
number = random.randint(1, dif)
57
score = float(1)
68

79
print("The goal of the game is to guess the number, and get the lowest score possible!")
810
time.sleep(1)
911
print("You will be told if the number you guessed is greater or lesser than the actual number!")
1012
time.sleep(1)
11-
print("Pick a number between 1 and 100!")
13+
print("Pick a number between 1 and ", dif, "!")
1214

1315
while True:
1416
guess = float(input("Enter your guess!"))

0 commit comments

Comments
 (0)