【发布时间】:2020-11-06 12:41:24
【问题描述】:
我的程序无法运行,因为它说它有语法错误。
answer1 = input("yes or no ");
if answer1 == "yes" :
{
print("Welcome to <<A Random Chance>>")
print("Today we will be playing <<Who's Higher>>")
【问题讨论】:
-
Python 不将 {} 用于代码块。相反,它使用缩进。
-
也去掉那个分号。语句以新行结束。
标签: python python-3.x