Q. Which of the following Python programs implement the control flow graph shown?

(a)
while True :
    n == int (input("Enter an int : "))
    if == A1 :
        continue
    elif n == A2 :
        break
    else :
        print ("what")
else :
    print ("ever")

(b)
while True :
    n = int ( input ( "Enter an int : "))
    if n == A1 :
        continue
    elif :
        n == A2 :
            break
    else :
        print ("what")
print ("ever")

(c)
while True :
    n == int ( input ("Enter an int : "))
    if n == A1 :
        continue
    elif n == A2 :
        break
print ("what")
print ("ever")

Answer =

Option (b) is correct.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post