What will be the output of the following Python code?     A. error   B. 1 2 3   C. none of the mentioned   D. 1 2

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
 

QUESTION 4

  1. What will be the output of the following Python code?

     

      A.

    error

      B.

    1

    2

    3

      C.

    none of the mentioned

      D.

    1

    2

     

     

 

i = 1
while True:
if i%3 == 0:
break
print (i)
i + = 1
Transcribed Image Text:i = 1 while True: if i%3 == 0: break print (i) i + = 1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Print statement
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning