I got stumbled at one exercise from the book Python for everybody could you help me pls?
Exercise 3: Write a program to prompt the user for hours and rate per hour to compute gross pay.
Enter Hours: 35
Enter Rate: 2.75
Pay: 96.25
i wrote that piece of code
#compute gross pay
prompt = 'Enter hours\n'
hours = input(prompt)
int(hours)
prompt = 'Enter rate\n'
rate = input(prompt)
int(rate)
pay = hours * rate
print(pay)
and i got an error message
Traceback (most recent call last):
File "ex2_pay", line 8, in <module>
pay = hours * rate
TypeError: can't multiply sequence by non-int of type 'str'
but i can not figure it out why. I did convert the return value to int