
Week 6 #1 CS172 - Conditionals Related Questions
Quiz
•
Computer Science
•
12th Grade
•
Practice Problem
•
Medium
Mr. Martin
Used 12+ times
FREE Resource
Student preview

14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a conditional statement?
To specify whether another statement or block of statements should be executed
To assign a value to a variable
To declare a variable
To perform arithmetic operations
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used for comparison in conditional statements?
=
==
<>
!>
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for an if statement?
if (condition) { statements }
if { condition } then { statements }
if [condition] then { statements }
if (condition) then { statements }
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of alternative execution in conditional statements?
To execute multiple sets of statements based on different conditions
To execute a single set of statements based on a condition
To execute a set of statements only if a condition is false
To execute a set of statements only if a condition is true
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of chained conditionals?
To check for a number of related conditions and choose one of several actions
To execute a set of statements only if a condition is true
To execute a set of statements only if a condition is false
To execute multiple sets of statements based on different conditions
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of nested conditionals?
To nest one conditional within another
To execute a set of statements only if a condition is true
To execute a set of statements only if a condition is false
To check for a number of related conditions and choose one of several actions
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for a switch statement?
switch(expression) { case constant-expression: statements; break; default: statements; }
switch(expression) { case constant-expression: statements; break; case constant-expression: statements; break; default: statements; }
switch(expression) { case constant-expression: statements; case constant-expression: statements; default: statements; }
switch(expression) { case constant-expression: statements; case constant-expression: statements; }
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computer Science
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade