What’s wrong with line 5? | Sololearn: Learn to code for FREE!


What’s wrong with line 5?



9/26/2019 5:22:11 PM

Parto Ghahramani

9 Answers

New Answer


You are treating integer 15 as a function. You need to use *, because if you strictly include parentheses ( ) after an integer, program assumes that you are calling the integer as a function. (You'll learn about functions in 3rd module of the Python 3 tutorial.) Just put * between 15 and (b-40) and your program should work fine.


Parto Ghahramani you are missing the asterisk symbol "*" for multiplication before the brackets in the print after else condition. Please look at the code https://code.sololearn.com/cq4nm41YkvAF/?ref=app


oh thanks guys so much❤️


You should use a * symbol before (b-40) to show that you are multiplying 15 and (b-40) else 15 will be treated as a function.


b=int(input('how many hrs u work?')) if b<=40: print(10*b) else: print(10*40+15 * (b-40)) You missed a * between 15 and the bracket


You didn't use * between 15 and (b-40)


you miss the 15 next what operation you want to perform. It is either * or + Or ÷ or -


print(10*40+15*(b-40)) this is the correct way to write that statement....


You missed a * between 15 and the bracket