
Programming Concepts Quiz

Quiz
•
Computers
•
9th Grade
•
Medium
PATRICIA LAMMERT
Used 3+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
40 questions
9th Grade - IT Programming - 2nd Cycle Exam

Quiz
•
9th Grade - University
35 questions
Study Guide for Final Exam*

Quiz
•
9th - 12th Grade
39 questions
G12_End of Term2_Revision

Quiz
•
9th - 12th Grade
37 questions
Robotics-1-PythonBooksA

Quiz
•
9th - 12th Grade
33 questions
Computer Systems 9

Quiz
•
9th - 10th Grade
33 questions
Web Design Final Exam Review-HTML

Quiz
•
9th - 12th Grade
40 questions
Java Test - 1

Quiz
•
9th - 12th Grade
34 questions
code.org Unit 3 Review

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade