Python Forum

Full Version: Error messages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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'
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
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.
In the future post such homework questions in the dedicated sub-forum.