Year 8  Python Quiz

Year 8 Python Quiz

8th Grade

•

24 Qs

quiz-placeholder

Similar activities

New Scratch

New Scratch

6th - 8th Grade

•

20 Qs

Create a magazine article with Publisher

Create a magazine article with Publisher

7th - 8th Grade

•

20 Qs

Understanding Copyright

Understanding Copyright

7th - 9th Grade

•

20 Qs

Yr7- Understanding computers Lessons 1-3

Yr7- Understanding computers Lessons 1-3

7th - 11th Grade

•

20 Qs

GoD tEiR

GoD tEiR

6th - 9th Grade

•

20 Qs

Hardware and Components

Hardware and Components

5th - 11th Grade

•

19 Qs

Python Recap

Python Recap

7th Grade - University

•

20 Qs

CPA Revision MCQ1

CPA Revision MCQ1

8th - 9th Grade

•

20 Qs

Year 8  Python Quiz

Year 8 Python Quiz

Assessment

Quiz

•

Computers

•

8th Grade

•

Hard

Created by

Michael Porter

Used 13+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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.

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?