Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Help me figure out the mistake

0 votes
asked Mar 28, 2024 by Shirshastha Bandyopadhyay (120 points)

Please help me figure out the mistake 
Code:

#0 to 9 display
start = 0
while start==10:
    print(start)
    start= start +1

3 Answers

+1 vote
answered Mar 30, 2024 by Mayur Gaikwad (250 points)
start = 0
while start < 10:
    print(start)
    start = start + 1

try this if this can be your answer
0 votes
answered Mar 31, 2024 by ????????? ???????? (140 points)
change option in while from "==" to "!="
+2 votes
answered Apr 1, 2024 by Peter Minarik (101,420 points)

Your loop condition is incorrect. You want to repeat the loop as long as your loop variable hasn't reached the maximum.

The right expression is below:

start = 0
while start < 10:
    print(start)
    start = start + 1
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...