我做了一个小程序来学习基础,我不明白为什么它不起作用所以你能帮我解释一下我的错误。欢迎每一个答案
import random
def gessing_game():
t = 0
r = random.randint(0,100)
print(r)
y = int(input("Please choose your number"))
while y != r:
t = t + 1
print("You have made",t,"attempts")
if y > r:
print("Too big!")
y = int(input(print("Please try again")))
if y < r:
print("Too small!")
y = int(input(print("Please try again")))
if y == r:
print("Well done you found it")
gessing_game()
这是他们如何定义我的错误
File "U:\Documents\Exo sur Thonny\Guessing_game.py", line 10
if y > r:
^
IndentationError: unexpected indent