Font size
WorksheetsTech Programming Concepts Quiz
Total questions: 108
Worksheet time: 3570secs
What helps programmers interact with and analyze how the program behaves?
Debugging tools
Writing documentation
Refactoring code
Running tests
Which programming languages support object-oriented programming (OOP)?
SQL and NoSQL
XML and JSON
C++ and Python
HTML and CSS
What does a diamond shape in a flowchart indicate?
A process
Input or output
The start or end of a program
A decision point
Which number type is similar to a float but can store larger and more precise numbers?
Double
Fixed-point
String
Integer
Which of the following is a string?
True
451
"Hello World"
99.999
What is one advantage of interpreted languages?
They are platform-independent.
They have limited access to system resources.
They are faster than compiled languages.
They turn source code into binary ahead of time.
What is a binary executable file?
A file that can be directly executed by the computer's processor
A file that contains text code
A file that stores images and videos
A file that needs to be interpreted line by line
Why is the planning process important in programming?
It eliminates the need for hardware.
It allows for immediate coding.
It ensures a well-thought-out program.
It helps in writing more code.
What is assembly language?
A compiler
A high-level programming language
A low-level programming language
A type of hardware
Which of the following is an example of an integer?
9.95
4.1
5.62
23
What is another term for interpreted languages?
Compiled languages
Scripting languages
Machine languages
Binary languages
Which type of loop runs a specific number of times?
Conditional loop
While loop
Infinite loop
For loop
Why are comments ignored by the computer?
Because they are written in uppercase letters
Because they are not part of the executable code
Because they are written in a different language
Because they are placed at the end of the code
What is the purpose of using functions in programming?
To create more variables
To avoid repeating the same code
To make the code longer
To write more comments
What is the role of a query in a database search?
To search the database and find matching records
To create new data
To delete data
To update software
What is a constant in a computer program?
A type of variable
A value that never changes
A type of identifier
A value that can change
Which of the following is an example of a character variable?
'7'
3.14
"555-1212"
False
In pseudocode, what does the symbol || represent?
Logical AND
Logical NOT
Logical OR
Logical XOR
What is the main purpose of a flowchart in programming?
To design the user interface of the program
To show the flow (sequence) of logic in a program
To test the program for errors
To write the actual code of the program
What is a loop in programming?
A statement that runs code repeatedly
A condition that stops the program
A function that runs once
A variable that stores data
What does the NOT operation do to a condition?
Leaves it unchanged
Makes it True
Inverts it
Makes it False
Which of the following is NOT a programming language?
Python
Assembly Language
HTML
C++
Why are arrays useful?
They are a type of function
They can hold only one value
They can be used in loops to go through values one by one
They are used to create databases
What makes it easier for humans to read and write instructions for computers?
Binary code
Hardware
Programming languages
Machine language
What is a class in object-oriented programming (OOP)?
A specific instance of an object.
A variable that stores data.
A method that an object can perform.
A blueprint or template for creating objects.
Why do modern developers not work directly with machine language?
It is too slow.
It is very hard to understand.
It is too expensive.
It is outdated.
What is bytecode?
A type of text file
A high-level programming language
A low-level language that is interpreted by a runtime engine
The final machine language code
What happens when you enter a number as a character?
You can perform math operations with it.
It becomes a string.
You cannot perform math operations with it.
It gets deleted.
What does the term "syntax" refer to in computer programming?
The color scheme of the code editor.
The type of computer used to run the program.
The speed at which a program runs.
The rules for how to write the language.
Why is understanding the code important for debugging?
To add new features
To improve the program's speed
To know what each part is supposed to do
To ensure the program looks good
In what areas is assembly language still used today?
Specialized areas
General programming
Graphic design
Web development
What is encapsulation in object-oriented programming (OOP)?
The method of defining variables in different ways.
The technique of keeping variables secure inside a class.
The action of making objects move around an environment.
The process of creating objects from a class.
Which of the following is an example of a floating-point number?
-7
23
8.02
'X'
What is an escape character used for in a string?
To end a string
To start a string
To include special characters in the output
To delete a character
What is the main purpose of pseudocode?
To describe what the code will do using plain language
To create a user interface for the program
To write the final code for a program
To compile the program into machine language
What does a function return after it runs?
A variable
A loop
A comment
A value
What is the purpose of adding comments to your code?
To make the code run faster
To create a user interface
To compile the code
To explain what each part of the code does
What is the first step in fixing errors in code?
Asking for help
Finding and repeating the problem
Writing comments
Running the program
Which symbol is used to show the logical flow of the program in a flowchart?
Arrow
Oval
Rectangle
Diamond
What type of language adds tags to text?
Scripting language
Interpreted language
Markup language
Compiled language
Why is code written in assembly language more efficient?
It is a high-level language.
It uses a compiler.
It is written in binary.
It allows direct access to hardware.
What is an array?
A type of loop
A single value variable
A special type of variable that holds many values at once
A type of function
What is an object in object-oriented programming (OOP)?
An action that an object can perform.
A method to store data securely.
A specific model built from a class.
A blueprint for creating classes.
Which Boolean operation returns True only if both conditions are True?
XOR
NOT
OR
AND
What does a conditional flow use to make decisions in a program?
Functions
Loops
Variables
If-then-else statements
What keyword is used in pseudocode to represent a loop with a condition at its beginning?
REPEAT-UNTIL
FOR
CASE
WHILE
What is sequential flow in a program?
Code that runs only once
Code that never runs
Code that runs in the order it is written
Code that runs in a random order
What type of variable is used to store the value True or False?
Boolean
Integer
String
Float
What is the main purpose of query languages?
To create websites
To get information from databases
To write stories
To design computer games
What is a character in programming?
A type of data storage
A collection of letters, numbers, or symbols
A programming language
A single letter, symbol, or number
What does the computer do after finding the records that match your search?
It organizes them into a nice-looking report
It ignores them
It deletes them
It sends them to another database
What does it mean for an array to be multidimensional?
It can hold arrays within arrays.
It can only be used in one-dimensional space.
It is a type of function.
It can hold only one value.
What is the main advantage of using bytecode?
It can run on any computer with a runtime engine.
It does not need to be compiled.
It runs slower than fully-compiled executables.
It is easier to write than machine language.
What does an array store?
A single character
A whole number
A collection of variables of the same type
A decimal number
Which symbol represents the Logical AND operation in pseudocode?
||
!
#
&&
What should be done before starting to code a program?
Decide what the program will look like.
Write as much code as possible.
Decide what the program should do.
Ignore planning and start coding immediately.
What is an interpreted language?
A language that is only used for web development
A language that cannot be used on multiple platforms
A language that runs instructions in the source code whenever you run the application
A language that converts source code into binary ahead of time
What is the main purpose of adding comments to a program?
To make the program run faster
To explain different parts of the program
To help the computer understand the code
To add errors to the program
What does SQL stand for?
Standard Query Language
Structured Query Language
System Query Language
Simple Query Language
Which number type would you use for precise financial calculations?
Fixed-point
Integer
Float
Double
An error in a program that prevents the program from running as expected. (a)
A team is making a platform jumper game. The background and platforms are working, but the main character won't appear. What might be the problem?
1) They forgot to call `drawSprites` in the draw loop.
2) The character sprite is drawn behind the background sprite.
3) The character sprite is drawn off the screen.
1 and 2
1 and 3
2 and 3
1, 2 and 3
What is the main purpose of a compiler in programming?
To convert high-level code into machine code
To design user interfaces
To store data in a database
To execute code line by line
Which of the following is a high-level programming language?
Binary
Java
Assembly
Machine code
What is the role of a variable in programming?
To store data that can change during program execution
To execute a program
To compile code
To create a user interface
What is a floating-point number?
A number with a specific number of digits after the decimal point
A number that can have decimal fractions
A number used only in financial calculations
A whole number
If condition A is True and condition B is False, what does the OR operation return?
False
True
Error
Maybe
If condition A is True and condition B is True, what does the OR operation return?
False
True
Error
Maybe
If condition A is True and condition B is True, what does the XOR operation return?
False
True
Error
Maybe
How is an array and a vector different?
An array has a fixed size, while a vector can change size dynamically
An array is a type of function, while a vector is a type of loop
An array holds multiple values, while a vector holds only one value
An array can change size dynamically, while a vector has a fixed size
What is a container in programming?
A single value variable
A type of loop
A type of function
A set of values held by an identifier
What are properties in a class?
Attributes that objects can have.
Actions that an object can do.
Methods that change data.
Specific instances of a class
What are methods in a class?
Attributes that objects can have.
Actions that an object can do.
Methods that change data.
Specific instances of a class
What is an Object in OOP?
Details about a class variable.
Actions that can be done.
The completed program
A specific instance of a class
Given answer = 'true', what type of variable is answer?
Character
String
Boolean
Illegal type
What do you put inside the parentheses when using a function?
The arguments or values the function needs to process
The function's name
The function's definition
The function's return value
What is the result of the expression !True?
Neither True nor False
True and False
False
True
What is the purpose of a compiler in programming?
To store data in memory
To convert high-level code to machine code
To execute code line by line
To manage hardware resources
Which of the following is a characteristic of object-oriented programming?
Sequential processing
Procedural execution
Data encapsulation
Global variables
What is the main advantage of using functions in programming?
To increase code redundancy
To improve code readability and reusability
To make code harder to debug
To slow down program execution
What does a Boolean operation compare to determine its state?
Two conditions
Three conditions
One condition
Four conditions
What is the purpose of an escape character in a string?
To end a string
To include a quote or special character in the output
To start a string
To delete a character
Which character is commonly used as an escape character?
/
#
\
*
Which Boolean operator is TRUE if both conditions are TRUE?
AND
OR
XOR
NOT
What is the result of the XOR Boolean operator if both conditions are TRUE?
FALSE
TRUE
Undefined
Error
In pseudocode, which symbol represents the Logical OR operator?
||
&&
#
!
What does the NOT Boolean operator do to a statement that is TRUE?
Makes it not TRUE
Makes it TRUE
Leaves it unchanged
Makes it undefined
What is an array?
A single value variable
A special type of variable that holds many values at once
A type of loop
A function in a program
Why are arrays useful in programming?
They can only hold one value
They allow for easy iteration over values using a loop
They are used to store functions
They are only used for graphics
What does it mean for an array to be multidimensional?
It can only hold one type of data
It can have arrays within arrays
It is a single-dimensional array
It cannot be used in programming
What is the role of logic in programming?
It helps in writing notes in your code.
It is like the brain of programming, allowing decision-making.
It improves the code later on.
It is used to build high-quality software.
What is the purpose of code documentation?
To make the code run faster.
To explain what the code does for easier reading and fixing.
To create software that is easy to use.
To identify programming organizational techniques.
What is the purpose of using an if-then-else statement in a program?
To print text to the console.
To declare variables.
To run different parts of the program based on decisions.
To increase the speed of the program.
What is the purpose of using loops in programming?
To repeat parts of the code as long as certain conditions are met
To execute code only once
To stop the program immediately
To handle errors in the program
What happens when a program gets a 'call' to go to another part of the program?
The program stops running
The program runs that code and returns to where it was
The program deletes the code
The program enters an infinite loop
Why is understanding program flow important?
It helps in writing good code and debugging
It makes the program run slower
It increases the size of the program
It is only useful for small programs
What is branching in computer programming?
A method to repeat code multiple times
A way to execute a different sequence of instructions based on a condition
A technique to store data in a program
A process to compile code
What type of statements are used in conditional branching as described in the text?
FOR-LOOP statements
SWITCH-CASE statements
IF-ELSE statements
WHILE-LOOP statements
What is the purpose of a "for" loop?
To run indefinitely
To run a specific number of times
To store data
To stop a program
How do "for" loops differ from "while" loops?
"For" loops run indefinitely, "while" loops run a set number of times.
"For" loops run a set number of times, "while" loops run as long as a condition is met.
"For" loops run only once, "while" loops run multiple times.
"For" loops and "while" loops are the same.
What is a function in programming?
A piece of code that performs a specific job
A type of variable
A method to store data
A way to compile code
What is the concept of modeling real-world objects in computer code called?
Functional Programming
Procedural Programming
Object-Oriented Programming
Logic Programming
In object-oriented programming, what is a class most similar to?
A finished product
A blueprint or template
A random object
A programming error
What is encapsulation in object-oriented programming?
The process of defining a class
Keeping variables secure inside a class
Creating multiple objects from a class
Changing the properties of an object
Which of the following is an example of a method in an object?
Design
Weight
Engine start
Material
Which of the following is a property of the car in the example?
Refuel
Convertible
Accelerate
Lower Roof
What is the process of fixing mistakes in code called?
Compiling
Debugging
Executing
Encrypting
What is the first step in fixing errors in code?
Writing new code
Finding and repeating the problem
Deleting the code
Ignoring the error
