Isn';下面的python代码是否正确缩进?

Isn';下面的python代码是否正确缩进?,python,indentation,Python,Indentation,这是我做的一个小游戏。简单的规则,玩家必须在我的脑海中决定数字。稍后我将导入随机模块 print('Hello!, What is your name?') userName = input() print(myName + 'Welcome to Guess it! Ralph') print('You must guess the number that I have in my mind(from 1 to 10) within 5 chances') myNumber = 3 prin

这是我做的一个小游戏。简单的规则,玩家必须在我的脑海中决定数字。稍后我将导入随机模块

print('Hello!, What is your name?')
userName = input()
print(myName + 'Welcome to Guess it! Ralph')
print('You must guess the number that I have in my mind(from 1 to 10) within 5 chances')
myNumber = 3

print('Give your prediction')

for no_of_chances in range(5, 0, -1):
    usersPrediction = input()
我在pycharm中运行时出现以下错误: 如果用户预测<我的编号: ^ 缩进错误:意外缩进

    if usersPrediction < myNumber:
        print('It is lower than required,try a higher value')
    elif usersPrediction > myNumber:
        print('It is higher than required,try a lower value')
    elif usersPrediction == myNumber:
    print('yahoo!, you did it')

print('You always have a next chance, try it again')
如果用户预测我的编号:
打印('高于要求,请尝试较低的值')
elif usersPrediction==myNumber:
打印('雅虎,你做到了')
打印('你总是有下一次机会,再试一次')
Indent
print('yahoo!,你做到了')