Not understood this programme | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
14th May 2022, 4:30 AM
HELL DRAGON
HELL DRAGON - avatar
2 Answers
+ 1
Which part is troubling you ... # read input of <items> items = int(input()) # read input of <days> days = int(input()) # while <days> greater than or equal to zero while days > 0: # multiply <items> by 2 items *= 2 # subtract <days> by 5 days -= 5 # when loop is completed, print <items> print(items)
14th May 2022, 5:58 AM
Ipang
+ 1
😅 ya I got the answer after posting it , anyway thanks
14th May 2022, 5:59 AM
HELL DRAGON
HELL DRAGON - avatar