0
Difficulty dealing with this task: While Loop (Python)
I am having serious difficulty in dealing with this task and trying to understand it. I've been trying to figure out how to really solve it. Please what could be the way around it? https://www.sololearn.com/learning/1073
3 Answers
+ 2
You can approach the problem with 1 while loop
* loop while dats > 0
* on each iteration, double items and then decrease days by 1
* print the result once after the loop
+ 1
Please mention the course and the task number. Show your code attempt so we can help you
0
Python 26.2 Practice
Code Attempt:
items = int(input())
days = int(input())
#your code goes here
i = 0
j = 0
while i <= days:
while j <= items:
print(items)
items*=2
i+=days