Reputation: 31
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.
Upvotes: 0
Views: 4875
Reputation: 1
It's an error we get when we try to add or do operations on incompatible or different data types. For example:
Integer, String
To avoid the error, either use STR()
to convert to String from Integer str(<Intiger Object>)
or INT()
for String to Integer. Like Int(<String Object>)
.
Upvotes: 0