NEW
Font size
WorksheetsProgramming CFE Review #1
Total questions: 26
Worksheet time: 13mins
Chris and Nephthalie are learning about different types of data in their programming class. Which of the following is a primitive variable type commonly used in programming?
Integer
Array
Function
Loop
Chris and Pam are working on a programming project. They need to decide on a variable type to store whether a feature is enabled or not. What is the primary purpose of a boolean variable in programming?
To store text
To store true or false values
To store decimal numbers
To store characters
Nephthalie is creating a program to store information about her friends. Which data type would she use to store a friend's name?
Integer
Double
String
Boolean
Nephthalie is baking a cake and needs to measure 3.14 cups of flour. Which data type would be most appropriate for storing this value?
Integer
Double
Boolean
Character
Chris wants to create a system to check if a user is above 18 years old. Which data type would Chris use for the age?
String
Integer
Boolean
Character
Chris and Pam are discussing a type of variable in their computer science class. Chris says that a variable that can only have the values true or false is called a:
String
Integer
Boolean
Double
Eliel and Amilcar are developing a weather application to display the temperature in Celsius. Which data type should they use to store the temperature?
Integer
Double
Boolean
String
Chris and Nephthalie are working on a coding project. They need to decide which of the following is a logical operator to use in their code?
&&
+
*
/
Kenyen and Amilcar have 10 apples in total. They decide to share them equally. How many apples does each person get?
5
2
10
0
Nephthalie wants to store her friend's name in a program. Which datatype would she use?
String
Integer
Boolean
Double
Harry, Nephthalie, and Dehmar are discussing different types of data they learned in their computer science class. Which of the following is NOT a type of data they mentioned?
Fractions
Integers
Doubles
Strings
What is the number of high complexity items for the benchmark "Use different number systems to represent data"?
1
2
3
0
Jimarcus and Amilcar are learning about different systems used to represent data in their computer science class. Which of the following is a type of number system they might study?
Integers
Paragraphs
Sentences
Chapters
Eliel and Chris are working on a project to understand different number systems. They need to find out how many moderate complexity items are there for the benchmark "Use different number systems to represent data"?
2
1
0
3
Amilcar and Pam are working on a project to understand how national and international standards are used to represent non-numerical data. What is the number of low complexity items they need to consider for their benchmark?
0
1
2
3
Nephthalie and Fantasia are working on a project to understand how national and international standards are used to represent non-numerical data. What is the total number of items they need to consider for this benchmark?
1
2
3
4
Chris, Dehmar, and Harry are working on a project together. They need to decide on a method to combine their ideas. Which of the following is NOT a Boolean logical operation they can use?
AND
OR
NOT
SUM
What is the main purpose of Boolean logic in programming?
To perform arithmetic calculations
To perform logical operations
To store data
To display graphics
Eliel and Nephthalie are planning a picnic. They need to decide whether to go to the park or stay indoors based on the weather. What does an IF-ELSE statement allow them to do in this scenario?
Repeat a block of code
Choose between two actions based on a condition
Store multiple values
Display output
Which of the following best describes a logical error?
An error that prevents the program from compiling
An error that causes the program to crash
An error that produces incorrect results but does not stop the program
An error that is always detected by the compiler
Which of the following languages is known for its use in web development and server-side scripting?
C++
Java
PHP
Python
Which language among C++, Java, and PHP is primarily used for system-level programming and has manual memory management?
Java
Ruby
C++
PHP
Which of the following languages is platform-independent and often used for building cross-platform applications?
C++
Java
PHP
JavaScript
Which of the following loop structures will always execute the loop body at least once?
WHILE loop
FOR loop
DO WHILE loop
None of the above
In a FOR loop, which part is responsible for updating the loop control variable?
Increment/Decrement
Body
Initialization
Condition
Which loop structure is best suited for iterating over a collection of elements with a known size?
WHILE loop
DO WHILE loop
FOR loop
All of the above
