Year 8  Python Quiz

Year 8 Python Quiz

8th Grade

24 Qs

quiz-placeholder

Similar activities

Year 7 - End of Unit

Year 7 - End of Unit

7th - 8th Grade

20 Qs

Programming

Programming

7th - 11th Grade

19 Qs

Python Quiz 2.1

Python Quiz 2.1

6th - 8th Grade

22 Qs

Python Intermediate Quiz (Including pygame)

Python Intermediate Quiz (Including pygame)

3rd - 12th Grade

20 Qs

Python basic commands

Python basic commands

8th Grade

20 Qs

Basics Python

Basics Python

8th - 10th Grade

20 Qs

Intro to Python Programming - Year 8

Intro to Python Programming - Year 8

8th Grade - University

20 Qs

Introduction to HTML

Introduction to HTML

6th - 8th Grade

20 Qs

Year 8  Python Quiz

Year 8 Python Quiz

Assessment

Quiz

Computers

8th Grade

Hard

Created by

Michael Porter

Used 11+ times

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which function outputs text to the terminal/shell?

write()

print()

output()

type()

Answer explanation

The function that outputs text to the terminal is print(). It is specifically designed to display text on the screen.

2.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Media Image

What letter will be printed on the screen after running this code:

e

x

t

Nothing prints

Answer explanation

The letter 't' will be printed on the screen after running the code because the code snippet does not contain any syntax errors and the last print statement outputs the letter 't'.

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

What output will this code produce?

Exeter

4

6

city

Answer explanation

The code will output 6 because the variable 'city' is assigned the value 6 before the print statement. 'Exeter' and 4 are not referenced in the code.

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What will the output be from the following code?
print("Hello world!")

SyntaxError

Hello world!

"Hello world!"

print(Hello world!)

Answer explanation

The correct output will be 'Hello world!' as the code will print the string 'Hello world!' to the console.

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is an Integer?

A data type that contains whole numbers. eg: 3, 45, 124

Numbers with decimal point. eg: 0.5, 2.45, 56.04

Group of characters between quotation marks. eg: "dog"

Data type that can only be True or False.

Answer explanation

An Integer is a data type that contains whole numbers like 3, 45, 124. It does not include numbers with decimal points or characters in quotation marks.

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is a Float?

A data type that contains whole numbers. eg: 3, 45, 124

Numbers with decimal point. eg: 0.5, 2.45, 56.04

Group of characters between quotation marks. eg: "dog"

Data type that can only be True or False.

Answer explanation

Numbers with decimal point are known as Floats, such as 0.5, 2.45, 56.04. They are used to represent real numbers in programming.

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is a Boolean?

A data type that contains whole numbers. eg: 3, 45, 124

Numbers with decimal point. eg: 0.5, 2.45, 56.04

Group of characters between quotation marks. eg: "dog"

Data type that can only be True or False.

Answer explanation

Data type that can only be True or False.

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?