Skip to content
Advertisement

TypeError: unsupported operand type(s) for /: ‘str’ and ‘str’

JavaScript

whenever i run this program i get this

JavaScript

what can i do to divide pyc by tpy?

Advertisement

Answer

By turning them into integers instead:

JavaScript

In python 3, the input() function returns a string. Always. This is a change from Python 2; the raw_input() function was renamed to input().

Advertisement