- 1
This is saying error
I have to multiply hrs with rate So, hrs=input("enter hours:") rate=input("enter rate") pay=hrs*rate print(pay) Here,hrs is 35 and rate is 2.75...I have entered the input.But it is saying error.Can someone help me,please???
2 Réponses
+ 5
hrs = int(input())
rate = float(input())
pay = hrs * rate
print(pay)
'''
Sample Input:
35
2.75
'''
# Keep learning & happy coding :D
https://code.sololearn.com/cmcQEHx464nU
+ 5
In Python input is always string. If you want a different type you have to convert it.
Please always tag the language you're asking about.
https://code.sololearn.com/W3uiji9X28C1/?ref=app