+ 9
What’s wrong with line 5?
9 odpowiedzi
+ 9
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.
+ 5
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
+ 3
oh thanks guys so much❤️
+ 3
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.
+ 2
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
+ 2
You didn't use * between 15 and (b-40)
+ 1
you miss the 15 next what operation you want to perform. It is either * or + Or ÷ or -
+ 1
print(10*40+15*(b-40)) this is the correct way to write that statement....
0
You missed a * between 15 and the bracket