Why am I getting the error TypeError: unsupported operand type(s) for //: 'str' and 'int' in my code? enter image description here
I was expecting it to print whole hours rented, but it came up with an error.
Why am I getting the error TypeError: unsupported operand type(s) for //: 'str' and 'int' in my code? enter image description here
I was expecting it to print whole hours rented, but it came up with an error.
It's an error we get when we try to add or do operations on incompatible or different data types. For example:
To avoid the error, either use
STR()to convert to String from Integerstr(<Intiger Object>)orINT()for String to Integer. LikeInt(<String Object>).