Y8 - Python - Quiz 2

Y8 - Python - Quiz 2

7th Grade

10 Qs

Similar activities

Programming Logic 1st

Programming Logic 1st

6th - 7th Grade

14 Qs

Python Basics - Year 8

Python Basics - Year 8

7th - 9th Grade

14 Qs

Coding in Minecraft #1

Coding in Minecraft #1

7th - 8th Grade

10 Qs

Computer Networks

Computer Networks

7th Grade

15 Qs

Intro to Scratch

Intro to Scratch

6th - 8th Grade

15 Qs

MineCraft

MineCraft

7th Grade

10 Qs

Python

Python

7th - 8th Grade

13 Qs

Scope of Variables in Python

Scope of Variables in Python

1st Grade - Professional Development

15 Qs

Y8 - Python - Quiz 2

Y8 - Python - Quiz 2

Assessment

Quiz

Created by

Courtney Owen

Computers

7th Grade

2 plays

Hard

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these describes what happens in a selection statement in programming?
A list of items is sorted
A block of code is chosen
A variable is declared
An array is looped through

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these words start a selection statement?
else
elif
if
select

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is the correct structure of a selection statement in Python?
Media Image
Media Image
Media Image
Media Image

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these operators is used to compare two values to see if they are equal to each other?
<=
!=
==
>=

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
Looking at the code, what are num1 and num2 known as?

Variables

Vestibules

Vectors

Viruses

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
Looking at the code, what would be output if the code was run?

Equal

10

Nothing

13

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
Looking at the code, what other type of statement would need to be included to add an alternative path to the selection statement?

alternative

else

instead

otherwise

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
Looking at the code, it now contains an else statement. What would be output now if the code was run?

10

Equal

Different

13

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
Looking at the code, its purpose is to check to see if the password entered by the user is equal to the string value 'admin'. If it is, they will be granted access otherwise they will be denied access. Which function name should be placed in 'A'?

input

print

if

else

10.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
Looking at the code, its purpose is to check to see if the password entered by the user is equal to the string value 'admin'. If it is, they will be granted access otherwise they will be denied access. Which condition should be placed in 'B'?

pass = "admin"

pass = admin

pass == admin

pass == "admin"

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?