+ 1

Whats my mistake in this code? I need help

items = int(input()) days = int(input()) while days>0: items= (6*2) days-=2 print(items)

16th Aug 2022, 6:45 AM
Nzidee Barisua Bright
Nzidee Barisua Bright - avatar
5 Answers
+ 2
Hi! to earn a loop, make at least three indents (spaces) to the right in the lines that follow "while" below. p.s. items = int(input()) days = int(input()) while days>0: items= (6*2) days-=2 print(items)
16th Aug 2022, 6:51 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Really.....
16th Aug 2022, 11:59 AM
Nzidee Barisua Bright
Nzidee Barisua Bright - avatar
+ 1
Bright Nzidee What is the output you were expecting?
18th Aug 2022, 5:41 AM
Chris Coder
Chris Coder - avatar
0
Bright Nzidee If you move the print to the same level as the rest, the while loop will pick it up. Not sure of your intended behavior but setting items = 12 no matter what, seems a little odd items=(6*2) https://code.sololearn.com/ce399sDyft41/?ref=app
18th Aug 2022, 6:12 AM
The Darkness
The Darkness - avatar