Answer the question
In order to leave comments, you need to log in
Don't know how to solve a Python problem?
Help with a solution.
Write a program to help you create a training plan to prepare for a marathon. It receives as input the number of kilometers on the planned marathon, how many the user plans to run on the first day of training, and by what percentage he plans to increase this distance every day. At the output, the program should give out how many days the user will need to prepare to run the target number of kilometers.
Restriction: You cannot use the ceil() function from the math module and its analogues.
Answer the question
In order to leave comments, you need to log in
length = 49.195
now = int(input())
percent = int(input()) / 100 + 1
days = 0
while now < length:
days += 1
now *= percent
print(days)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question