CS的新手。我的转换程序出现synatx错误[关闭]

问题描述 投票:-2回答:1
print("Welcome to our conversion program. ") feet = float(input("Enter height in feet:")) # prompt user to input height and store in variable feet remainder = float(input("Enter remaining inches")) # prompt user to input inches and store value as remainder (12*feet+remainder) = inches if inches >= 96 print(This person is really tall)
python syntax
1个回答
2
投票
将来,请始终在错误中查找确切的消息和行号。就您而言,您有几个语法错误。

print("Welcome to our conversion program. ") feet = float(input("Enter height in feet:")) # prompt user to input height and store in variable feet remainder = float(input("Enter remaining inches")) # prompt user to input inches and store value as remainder # variable being assigned goes on the left inches = (12*feet+remainder) # You're missing a colon if inches >= 96: # Missing quotes print("This person is really tall")

© www.soinside.com 2019 - 2024. All rights reserved.