Computer Science
How many times will the following code be executed?
a = 5
while a > 0:
print(a)
print("Thank You")
- 5 times
- Once
- Infinite
- None of these
Related Questions
What does the following code print to console?
if True: print (101) else: print (202)- 101
- 202
- 303
- 102
Which of the following is not a loop statement in Python?
- do-while
- while
- for
- All of these
Which statement is used to iterate itself over a range of values or a sequence?
- if
- while
- do-while
- for
In a Python program, a control structure:
- Directs the order of execution of the statements in the program
- Dictates what happens before the program starts and after it terminates
- Defines program-specific data structures
- Manages the input and output of control characters