This is saying error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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???

24th Oct 2021, 4:51 PM
Anjon Nath Prium
Anjon Nath Prium - avatar
2 Answers
+ 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
24th Oct 2021, 5:03 PM
SoloProg
SoloProg - avatar
+ 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
24th Oct 2021, 5:10 PM
Simon Sauter
Simon Sauter - avatar