wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming CFE Review #1

Total questions: 26

Worksheet time: 13mins

Name
Class
Date
1.

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?

a)

Integer

b)

Array

c)

Function

d)

Loop

2.

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?

a)

To store text

b)

To store true or false values

c)

To store decimal numbers

d)

To store characters

3.

Nephthalie is creating a program to store information about her friends. Which data type would she use to store a friend's name?

a)

Integer

b)

Double

c)

String

d)

Boolean

4.

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?

a)

Integer

b)

Double

c)

Boolean

d)

Character

5.

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?

a)

String

b)

Integer

c)

Boolean

d)

Character

6.

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:

a)

String

b)

Integer

c)

Boolean

d)

Double

7.

Eliel and Amilcar are developing a weather application to display the temperature in Celsius. Which data type should they use to store the temperature?

a)

Integer

b)

Double

c)

Boolean

d)

String

8.

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?

a)

&&

b)

+

c)

*

d)

/

9.

Kenyen and Amilcar have 10 apples in total. They decide to share them equally. How many apples does each person get?

a)

5

b)

2

c)

10

d)

0

10.

Nephthalie wants to store her friend's name in a program. Which datatype would she use?

a)

String

b)

Integer

c)

Boolean

d)

Double

11.

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?

a)

Fractions

b)

Integers

c)

Doubles

d)

Strings

12.

What is the number of high complexity items for the benchmark "Use different number systems to represent data"?

a)

1

b)

2

c)

3

d)

0

13.

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?

a)

Integers

b)

Paragraphs

c)

Sentences

d)

Chapters

14.

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"?

a)

2

b)

1

c)

0

d)

3

15.

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?

a)

0

b)

1

c)

2

d)

3

16.

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?

a)

1

b)

2

c)

3

d)

4

17.

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?

a)

AND

b)

OR

c)

NOT

d)

SUM

18.

What is the main purpose of Boolean logic in programming?

a)

To perform arithmetic calculations

b)

To perform logical operations

c)

To store data

d)

To display graphics

19.

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?

a)

Repeat a block of code

b)

Choose between two actions based on a condition

c)

Store multiple values

d)

Display output

20.

Which of the following best describes a logical error?

a)

An error that prevents the program from compiling

b)

An error that causes the program to crash

c)

An error that produces incorrect results but does not stop the program

d)

An error that is always detected by the compiler

21.

Which of the following languages is known for its use in web development and server-side scripting?

a)

C++

b)

Java

c)

PHP

d)

Python

22.

Which language among C++, Java, and PHP is primarily used for system-level programming and has manual memory management?

a)

Java

b)

Ruby

c)

C++

d)

PHP

23.

Which of the following languages is platform-independent and often used for building cross-platform applications?

a)

C++

b)

Java

c)

PHP

d)

JavaScript

24.

Which of the following loop structures will always execute the loop body at least once?

a)

WHILE loop

b)

FOR loop

c)

DO WHILE loop

d)

None of the above

25.

In a FOR loop, which part is responsible for updating the loop control variable?

a)

Increment/Decrement

b)

Body

c)

Initialization

d)

Condition

26.

Which loop structure is best suited for iterating over a collection of elements with a known size?

a)

WHILE loop

b)

DO WHILE loop

c)

FOR loop

d)

All of the above