How do I debug this object not callable in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I debug this object not callable in python

#This is the code# below https://code.sololearn.com/cseS3S9iJ32g/?ref=app

17th Dec 2017, 12:25 PM
Adelanwa Abdullateef
Adelanwa Abdullateef - avatar
5 Answers
+ 1
Thanks👍, let me try it out
17th Dec 2017, 2:01 PM
Adelanwa Abdullateef
Adelanwa Abdullateef - avatar
0
instead of creating a variable to make your input an integer, just do it as your input. replace: hours = input("Enter Hours") with: hours = int(input("Enter Hours")) hours = int(input('Enter hours: ')) #Remove This Line- input = int(hours) rate = 10 pay = hours * rate payOver40hr = hours * (rate +15) if hours == 40.0: print(pay) elif hours > 40.0: print(payOver40hr)
17th Dec 2017, 1:26 PM
LordHill
LordHill - avatar
0
for future reference, if you want to change a string to an int after input instead of getting it as the input, creating a variable of "input" isn't the way. input = int(hours) what you would have wanted to do would have been hours = int(hours)
17th Dec 2017, 1:31 PM
LordHill
LordHill - avatar
0
Yippee, it worked. Thanks
17th Dec 2017, 4:36 PM
Adelanwa Abdullateef
Adelanwa Abdullateef - avatar
0
np
17th Dec 2017, 4:38 PM
LordHill
LordHill - avatar