python空闲语法有问题无效
错误:-python空闲语法有问题无效,python,Python,错误:- def main(): # Input place = input("Will we go to north carolina?") if (place == "Yes"): print ("The drive will take all most a full day.") else: print ("I do not know how lo
def main():
# Input
place = input("Will we go to north carolina?")
if (place == "Yes"):
print ("The drive will take all most a full day.")
else:
print ("I do not know how long the drive wil last.")
main()
代码:-
def main():
# Input
place = input("Will we go to north carolina?")
if (place == "Yes"):
print ("The drive will take all most a full day.")
else:
print ("I do not know how long the drive wil last.")
main()
它表示语法无效,并以红色突出显示main您应该在脚本模式下运行此多行代码,方法是转到New->File
如果只想使用此功能,请在函数后单击两次enter键以返回提示您可以先尝试输入函数,然后按两次enter键,以便再次在屏幕上看到“>>>”,然后调用主函数。