We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f66b404 commit 42155c2Copy full SHA for 42155c2
week-4/Game/game.py
@@ -16,10 +16,16 @@ def main():
16
17
while True:
18
user = valid_input("Guess: ")
19
+ if user == 1 and input_user == 1:
20
+ print("Just right!")
21
+ break
22
+
23
if user < rand_number:
24
print("Too small!")
25
26
elif user > rand_number:
27
print("Too Large!")
28
29
else:
30
print("Just right!")
31
break
@@ -29,6 +35,8 @@ def valid_input(message_in):
35
36
try:
37
temp = int(input(message_in))
38
+ if temp <= 0:
39
+ continue
32
40
except ValueError:
33
41
continue
34
42
0 commit comments