@gabbyneve/

NeveDogLover

Python

No description

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
22
23
24
25
import random

n = random.randint(1,100)

guess_correct = False

l = list()

while guess_correct == False:
  g = int(input("Enter your guess: "))
  l.append(g)
  if g == n:
    print('Your guess was correct')
    guess_correct = True
  elif g > n:
    print("Too high please try a lower number")
  else:
    print("Too low please try a higher number")

print("Number was ", n)

s="You guessed"
for g2 in l:
 s=s+" " +str(g2)
print(s)