
Programming Concepts Quiz
Quiz
•
Computers
•
9th Grade
•
Practice Problem
•
Medium
PATRICIA LAMMERT
Used 3+ times
FREE Resource
Enhance your content in a minute
38 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about comments in code?
Every function should have a comment
Comments are not necessary for any code
Comments are only needed for complex code
Every line of code must have a comment
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a precondition in the context of a function?
The function's parameters
What is true about the world before the function is called
What is true about the world after the function is called
The function's return value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about postconditions?
They describe the initial state of the world
They describe the function's parameters
They describe the state of the world after the function is called
They are irrelevant to function execution
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In programming, what must be true before a function is executed?
The postcondition
The function's name
The function's output
The precondition
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of defining preconditions and postconditions?
To determine the function's name
To define the function's parameters
To describe the state of the world before and after the function is called
To calculate the function's execution time
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is equivalent to writing 'move();' five times?
for(var i = 0; i < 5; i++) { move(); }
for(var i = 0; i < 4; i++) { move(); }
for(var i = 1; i < 5; i++) { move(); }
for(var i = 1; i <= 5; i++) { move(); }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main advantage of using a for loop over writing repetitive code manually?
It reduces the amount of code written
It increases the complexity
It makes the code run faster
It makes debugging harder
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
33 questions
AP CSP Review
Quiz
•
9th - 12th Grade
40 questions
Python
Quiz
•
9th Grade
35 questions
Micro:bit
Quiz
•
1st Grade - University
35 questions
term 2 practice grade 7
Quiz
•
7th Grade - University
35 questions
LATIHAN SAS GANJIL DKV X
Quiz
•
9th - 12th Grade
37 questions
Algorithm: Flowcharts
Quiz
•
8th - 10th Grade
37 questions
Stock Market-Stock Market Game
Quiz
•
8th - 12th Grade
33 questions
Eduqas Computer Science 1.1 Hardware
Quiz
•
9th - 11th Grade
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
