
Programming Basics Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Easy
Teresa Gordon
Used 2+ times
FREE Resource
Enhance your content in a minute
38 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the keyword used to start an if statement in programming?
for
while
if
switch
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In an if statement, what follows the keyword 'if'?
A semicolon
A condition or Boolean expression
A variable declaration
A function call
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the code body in an if statement?
To declare variables
To execute code if the condition is true
To define functions
To import libraries
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet if `isHeads` is set to `true`?
It's heads! You win!
It's tails! You lose!
Error: `isHeads` is not defined
No output
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet if `isHeads` is set to `false`?
A) It's heads! You win!
B) It's tails! You lose!
C) No output
D) Syntax error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to start an if-else statement in programming?
for
while
if
switch
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the condition in an if-else statement?
To repeat a block of code
To check if a block of code should be executed
To define a function
To declare a variable
Access all questions and much more by creating a free account
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?
Similar Resources on Wayground
40 questions
Networking Principles
Quiz
•
11th - 12th Grade
40 questions
Microsoft Excel Terminology
Quiz
•
9th - 12th Grade
40 questions
Entrepreneurship/Business Plan/College Practice Test
Quiz
•
9th - 12th Grade
40 questions
สอบกลางภาค
Quiz
•
9th - 12th Grade
35 questions
Excel 2016 Introduction
Quiz
•
10th - 12th Grade
34 questions
TIN 9 ÔN TẬP GIỮA KỲ 2
Quiz
•
8th Grade - University
38 questions
ÔN TẬP GK2 - TIN HỌC 12
Quiz
•
12th Grade
40 questions
Latihan ganjil
Quiz
•
9th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
