+ 1
Why it is showing no output
d=3 While d==15: Print(d) d=d+1
3 Answers
+ 3
The while loop doesn't execute. It will only loop while the condition is true. As d=3 and the loop only executes when d=15, it will be skipped over.
+ 3
It's because d is never equal 15, therefore the loop never executes. To print the numbers from 3 to 15, you should do it like this:
d = 3
while d <= 15:
print(d)
d += 1
+ 1
Thanks