0
Не могу ввести число с плавающей точкой (0.01).В чем дело?
Текст программы: pm = input('->') payment02 = float(pm) print(payment02) sum02 = 0 i = 1 while i <= 30: sum02 += payment02 * 2 ** (i - 1) i += 1 print(round(sum02,2)) Мое решение задания из: Python Core/Basic Concepts/Exponentiation После команды RUN выдает ошибку:ValueError: could not convert string to float: ''
5 Réponses
0
I've solved the problem this way :
b = 0.01*(2**30)
print(b)
0
Looks like it works to me. What is it doing wrong?
0
My task solution from: Python Core / Basic Concepts / Exponentiation
After the RUN command, it gives an error: ValueError: could not convert string to float: ''
0
Thanks. I didn't understand the problem condition.
# место для вашего кода
payment = 0.01
i = 30
pdi = payment * 2 ** i
print(pdi)
0
No problem 😄