Search Header Logo

CS Principles - Unit 3 Quiz

Authored by Courtney Stenzhorn

Computers

9th - 12th Grade

Used 27+ times

CS Principles - Unit 3 Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

When do you use an else statement?

To tell what will happen when an if-statement is false

To end an IF statement

To handle string values

To input a variable

2.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

Select all the mistakes (there may be more than one) in the following:

The = should be ==

elseif should be elif

there is no end if

The else should have a :

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is NOT true about all algorithms?

All algorithms can only do number calculations.

All algorithms have clear instructions.

All algorithms stop in a finite amount of time.

All algorithms have an order.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The following code could be rewritten using:

not

or

and

none of the answers

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

When should you use an ELIF statement?

To repeat sections of code

To make a follow-up True/False decision

To counter user actions

To get user input

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Write the code to test if the number in the variable text1 is greater than 15.

if (text1 > "15"):

if (text1 < "15"):

if (text1 >= 15):

if (text1 > 15):

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Write the code to test if the number 78 is stored in the variable text1:

if (text1 == "78"):

if (str(text1) == 78):

if (text1 == 78):

if ("text1" == 78):

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?