0
0.01 is not callable
# your code goes here aux = 0 day = 30 mon = 0 while day < aux: mon = mon + ( 0.01(2**aux)) aux =+ 1 print(mon) In line 6 I have a problem , how could I solve?
7 Antworten
+ 1
Without the "*" python assumes you're trying to call a function called "0.01()". That's why the error message says "0.01 is not callable".
+ 1
What are you trying to do? What is the expected output?
+ 1
In everyday maths we often abbreviate "x * y" to "xy". In Python you can't do that; you always have to use "*".
+ 1
Thanks, I forgot the "*" 😅
0
Since day = 30
and aux = 0
day < aux is False.
Therefore the loop will not be executed and the output is 0.
0
I'm solving the problem of one excercise that I have to do 0.01(2**n) and when I'm trying to run, show 0.01 is not callable
0
There is an operator missing between
0.01
and
(2**aux).
Most likely what you want is
0.01 * (2**aux)