Python Forum
Thread Rating:
  • 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error messages
#1
I was wonder whether anyone would be able to explain each line of the following python error message. Thanks

Error:
Traceback (most recent call last): File "E:\testing_code_Test3.py", line 17, in <module> second ** "2" TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Reply
#2
What is not clear?
it says you have TypeError on line 17. You try to apply unsupported operand for second (which is of type int) and "2", which is obviously of type str.
Also, in the future post the relevant part of your code too
Reply
#3
Thanks mate! I didn't actually have the original code as the text above is apart of a Question where I have to describe what the error message means.
Reply
#4
In the future post such homework questions in the dedicated sub-forum.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020