Search Header Logo

Unit 4 Advanced AP CSP

Authored by Mister Swagner

Computers

9th - 12th Grade

Used 11+ times

 Unit 4 Advanced AP CSP
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

1. Which of the following scenarios would require the use of a function?

A. Storing a user's name
B. Evaluating an arithmetic expression
C. Repeating a set of instructions for different inputs
D. Comparing two values

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

2. How would you modify the value of an existing variable named "age" to 25?

A. age == 25

B. age = 25

C. 25 += age

D. age(25)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

3. Which of the following is not a comparison operator?

A. !=

B. ==

C. <=

D. &&

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

4. In a conditional statement, which type of value determines which code block is executed?

A. Integer
B. String
C. Boolean
D. Float

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

5. If a function is designed to calculate the square of a number, what would be the result of the function call for the value 5?

A. 10
B. 25
C. 30
D. 35

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

6. How would you code the NOT logical operator to reverse the truth value of the expression (a > b)?

A. !(a > b)

B. (a > b) NOT

C. (a > b) !=

D. NOT (a > b)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

7. Analyze the following expression: (x > 10) AND (y < 20). What type of value does this expression return?

A. Integer
B. Float
C. String
D. Boolean

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?