Can someone please help with my python code?

please help, i can’t figure out what i’m missing?
Python Interpreter on Pycharm

user_num: str = input(int(Enter integer:, \n ))
print(‘You entered:’, user_num)

print(user_num, ‘squared is’, user_num * user_num)
print(‘And’, user_num, ‘cubed is’, user_num * user_num * user_num, ‘!!’)

user_num2 = int(input(‘Enter another integer:\n’))
print(user_num, ‘+’, user_num2, ‘is’, user_num + user_num2)
print(user_num, ‘*’, user_num2, ‘is’, user_num * user_num2)

I know I have mistakes on other lines also but interpreter keeps on saying
that there is a proglem on line 1 with an end statement and syntax error?
THANK YOU!!

The syntax error is because you have a string that’s not wrapped in quotes (Enter ...).

Additionally the input() and int() calls are wrapped the wrong way around, but that’s not a syntax error. :wink:

Thank you @airtower-luna I really appreciate your response! I am working in zyBooks and it is not the best experience but I really enjoy the level of difficulty. So I am going to fix these errors but again thankyou!!!

1 Like