Podcast
Questions and Answers
Which of the following is not a selection statement?
Which of the following is not a selection statement?
- switch statement
- if statement
- for loop (correct)
- while loop
What is the purpose of a selection statement?
What is the purpose of a selection statement?
- To repeat a block of code
- To declare a variable
- To define a function
- To execute a block of code based on a condition (correct)
Which of the following is an example of a selection statement?
Which of the following is an example of a selection statement?
- print statement
- return statement
- input statement
- if statement (correct)