Feb-07-2021, 07:57 PM
You should solve the problem as described in the statement of work. The statement of work says:
Quote:There are 150 apples on a tree. They are increased by 15% every week.This could be done with a loop, but that is not a good choice for solving this problem. You wouldn't do this would you?
how many number of apples will we get after 5 weeks.
# Calculate 5 squared result = 1 for _ in range(5): result = result * 5Just because you are writing programs for a programming class it doesn't mean you should turn off you brain. If I was teaching the course I would fail everyone who used a loop for this assignment.