Table of Contents
ToggleQuestion 1
Which of the following is False regarding loops in Python??
- Loops are used to perform certain tasks repeatedly.
- Loop is executed repeatedly until the given condition becomes False.
- Loop is executed repeatedly until the given condition becomes True.
- Loop can be used to iterate the sequences like an array, list, dictionary, tuple, dictionary, and set.
4. Loop can be used to iterate the sequences like an array, list, dictionary, tuple, dictionary, and set.
Question 5
What is the output of the following code? if True: print(“Welcome to VITYARTHI”) else: print(“Welcome to Python Essentials”)?
- Welcome to VITYARTHI
- Welcome to Python Essentials
- Both
- None
- Welcome to VITYARTHI
Question 6
What is the output of the following code? if(print(“Hi”)): print(“Greetings”) else: print(“Good Bye”)?
- Hi Good Bye
- Hi
- Good Bye
- Hi Good Bye
Question 8
What is the output of the following code? if 4+6==10: print(“TRUE”) else: print(“False”) print (“TRUE”)?
- TRUE TRUE
- TRUE False
- False TRUE
- None
- TRUE TRUE
If you find anything wrong in this Answer Key, feel free to reach us in the comment section.