Infinite While loop flowchart


while (True):
    a=int(input()) #input

I wanted to create a program that loop until the user enters some value then the loop would break. Therefore I’m trying this way.I have to draw the flow chart too.

how to draw {while(True):} situation?

What will be the flowchart for this infinite while loop code?

Asked By: Nima



The input() function in Python is a blocking function. This means that the program will not terminate until the input() call returns, and this in turn won’t return until the user provides an input. And this should be reflected in the flowchart.

The flowchart would look something like this:


Answered By: ela16
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.