Unit 2 and 3_CS Python

Unit 2 and 3_CS Python

9th - 12th Grade

9 Qs

quiz-placeholder

Similar activities

APCSA - Unit 3

APCSA - Unit 3

9th - 12th Grade

10 Qs

SUBROUTINE 101

SUBROUTINE 101

9th Grade

10 Qs

Variables and Functions

Variables and Functions

KG - University

10 Qs

A4 IIIB - Funciones PSeInt & Python

A4 IIIB - Funciones PSeInt & Python

10th Grade - University

10 Qs

Methods in Java

Methods in Java

10th - 12th Grade

11 Qs

Ponteiros em C

Ponteiros em C

9th - 12th Grade

12 Qs

10 grado

10 grado

11th Grade

5 Qs

IGCSE Computer Science - Chapter 9: Problem-Solving and Design

IGCSE Computer Science - Chapter 9: Problem-Solving and Design

9th - 10th Grade

10 Qs

Unit 2 and 3_CS Python

Unit 2 and 3_CS Python

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Marco Castro

Used 1+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Write the code to test if num1 and num2 are the same.

if num1 == num2:

if num1 != num2:

if num1 < num2:

if num1 = num2:

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

1

2

3

syntax error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following would NOT fix the error for the following code:

Change Bob to "Bob"


Add parentheses in the code

Add a : (colon) at the end of the line of code

Change IF to if

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To test if a variable is between two numbers you would use:

and

else

or

!

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the Output for the following code?

1

2

3.4

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following calculations would evaluate to 12?

3 * 6 + 2 / 2

(3 * 6 + 2) / 2

3 * ((6 + 2) / 2)

(3 * 6) + 2 / 2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When should you use an else statement?

To execute code when one of the other expressions were TRUE

To check one of many expressions for TRUE

To check the first expression for TRUE

To execute code if none of the other expressions were TRUE

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

if (text1 < "15"):
if (text1 > 15):
if (text1 >= 15):
if (text1 > "15"):

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Find the mistake in the following code:

There should not be ( )

The variable “name1” must be capitalized

“sue” is spelled wrong


= should be ==