0

Hi

Python issue — Hour=input (ā€œenter the hourā€) Rate=input(ā€œenter the rateā€) Pay=Hour*Rate Print (Pay) — This is the code and i got some issue with this saying ā€œconversion str to non int something ā€œ Please help me anyone?

23rd May 2021, 2:09 PM
shubham
shubham - avatar
2 Answers
+ 4
input() is used to read string values.. To read integer or float you need to typecast that as follows. a = int(input()) #For integers b = float(input()) #For floating point numbers
23rd May 2021, 2:13 PM
sarada lakshmi
sarada lakshmi - avatar
+ 1
It worked thanks sarada lakshmi
23rd May 2021, 4:20 PM
shubham
shubham - avatar