Search Header Logo

Edhesive - Intro to CS Unit 3

Authored by Katie Kunz

Computers

9th - 12th Grade

Used 8+ times

Edhesive - Intro to CS Unit 3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an if-then statement used for in a program?

Repeat sections of code

To allow programs to make decisions

To count user input

Answer explanation

IF statements check conditions in order to decide if certain lines of code should be ran or not.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The following code can be rewritten as:


if 75 <= y <= 100:

if (75 <= y and <= 100):

if 75 <= y and <= 100):

if (75 <= y and y <= 100):

if (75 <= y <= 100):

Answer explanation

This correctly tests if 75 is smaller than y AND if y is smaller than 100

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is true when a is 4 and b is 8?

a < b and a==b

b <= a or a > b

a > b or a == b

a < b and a != b

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The following code could be rewritten using:

if (num1 == 17):

if ( num2 < 20):

not

or

and

none of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To test if x is less than or equal to y:


if (x ______y):

>

<

>=

<=

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

For if statements to work in Python, you must ________ them.

intent

make decisions about

add an else to

use input commands with

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The else happens when the if condition is _________

true

false

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?