Comp Sci Mid Quarter Review Quiz

Comp Sci Mid Quarter Review Quiz

9th - 12th Grade

8 Qs

quiz-placeholder

Similar activities

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

IDT UNIT 3

IDT UNIT 3

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

APCSA - Unit 3

APCSA - Unit 3

9th - 12th Grade

10 Qs

SUBROUTINE 101

SUBROUTINE 101

9th Grade

10 Qs

Comp Sci Mid Quarter Review Quiz

Comp Sci Mid Quarter Review Quiz

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Michael Kendall

Used 15+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

What is an IF statement used for? Select all that apply.

Make True/ False decisions

To count user input

Select between options in a program

Repeat sections of code

2.

MULTIPLE CHOICE QUESTION

2 mins • 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):

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following code:

x = 18

if (x > 18):

 print(1)

elif (x < 18):

 print(2)

else:

 print(3)


Which of the following will the code output?

1

2

3

4.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

The following line is seeing if the variable name1 is equal to the string Bob. Select all options that would fix an error in the following code:


IF (name1 == Bob)

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

Change Bob to "Bob"

Change IF to if

Remove the parentheses in the code

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

and

!

else

or

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following correctly tests if a number equals 90 or 100?

if (x == 90 and 100):

if (x == 90 and x == 100):

if (x == 90 or 100):

if (x == 90 or x == 100):

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

if (x > 40 and < 50):

The code above should be rewritten as:

The code is fine

if (50 > x or x > 40):

if (50 > x and > 40):

if (x > 40 and x < 50):

8.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following represents not equal to?

>=

!=

<=

==