I've been learning how to program in Python. I've written a program with Python. But when I run it in the terminal (Linux Ubuntu, Python3), the Python interpreter indicates that if power>2 is "invalid syntax". What is going on? The part below is an extract from my entire program.
x1=int(input('Enter an interger '))
x2=int(input('Enter an interger '))
x3=int(input('Enter an interger '))
power=int(input('Enter an interger ')
if power>2:
print('No')
elif power<2:
print('Yes')
else:
print('OK')
Aucun commentaire:
Enregistrer un commentaire