May-21-2018, 05:58 PM
Hi i'm new to python and i just don't understand this error
Python code
width=input("what is the width?")
height=input("what is the height?")
area=width*height
print("The area is" ,area)
ERROR
what is the width? 2
what is the height? 3
Traceback (most recent call last):
line 3, in <module>
area=width*height
TypeError: can't multiply sequence by non-int of type 'str'
width=input("what is the width?")
height=input("what is the height?")
area=width*height
print("The area is" ,area)
ERROR
what is the width? 2
what is the height? 3
Traceback (most recent call last):
line 3, in <module>
area=width*height
TypeError: can't multiply sequence by non-int of type 'str'