PY
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
26
27
28
#This code doesn't work properly on Sololearn's Code Playground, because it needs input at different times. Run it in Python IDLE or QPython3 to test it out and then give it a like :)
import random
num = random.randrange(0,101)
points = 100
print("Guess a number between 1 and 100.")
print("Points: " + str(points))
#print(num)
input_num = int(input())
def guess(a,b,c):
if a == b:
print("You Won")
print("Points: " + str(c))
elif a != b:
c -= 10
if c <= 0:
print("Points: " + str(c))
print("Game Over")
else:
print("Points: " + str(c))
print("Guess Again")
if a > b:
print("The number is smaller")
elif a < b:
print("The number is bigger")
input_num = int(input())
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run