几天前我开始使用python,现在正在学习如何使用“if”和“elif”…创建了一个基本程序……当我使用elif时,它向我展示了这一点syntax error:invalid syntaxprint('welcome to my calculator')
num1 = int(input('enter the first number:'))
num2 = int(input('enter the second number:'))
print('select options')
functions = ['Add','Sub','Mul','Div']
print (functions)
options = input("enter the desired option:")
if options == 'Add':
print(num1+num2)
print('num1+num2=', num1+num2)
elif options == 'Sub':
print(num1-num2)
print('num1-num2=', (num1-num2))
当我运行这个时,我得到了以下错误
^{pr2}$
有人能帮我解决这个错误吗?在