I've just started learning Python. As this is my first language, don't be harsh on me if this is too easy. I can't figure out how to solve this. This is what i've programed:
a=input("Enter pyramid base size ")
H=input ("Enter pyramid height size ")
P=a*a+2*a*h
print (P)
But this comes out:
Enter pyramid base size 2
Enter pyramid height size 2
Traceback (most recent call last):
File "D:\Program Files (x86)\Python\pyramid.py", line 3, in <module>
P=a*a+2*a*h
TypeError: can't multiply sequence by non-int of type 'str'