@DragoniteDL/

Guessing Game

Python

A number guessing game.

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
print('Thinking of a number between 1 & 10...')
import time
import random
num = random.randint(1,10)
win = 0
time.sleep(1)
print('Okay! You can now guess!')
time.sleep(.5)
print('(P.s, use interegers...)')
while (win < 1):
 user = input()
 user_int = int(user)
 if user_int > num:
   print('Go Lower!')
 else:
     if user_int < num:
       print('Go Higher!')
     else:
         if user_int == num:
           print('You win!')
           win = 1