Python Revision

Python Revision

8th Grade

16 Qs

quiz-placeholder

Similar activities

Python KS3

Python KS3

8th Grade

17 Qs

Python2

Python2

8th Grade - University

15 Qs

Python Recap

Python Recap

7th Grade - University

20 Qs

Python Basics

Python Basics

KG - University

16 Qs

Python Year 9 Quiz

Python Year 9 Quiz

8th - 10th Grade

19 Qs

Python Review Quiz

Python Review Quiz

7th - 9th Grade

20 Qs

Python basics

Python basics

2nd - 9th Grade

20 Qs

Basic Python Key Terms

Basic Python Key Terms

6th - 8th Grade

20 Qs

Python Revision

Python Revision

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Chloe Wilkes

Used 19+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a comment?

" this is a comment "

# this is a comment

this is a comment

# this is a comment #

Answer explanation

Media Image

Comments start with a #. " initiates a string.

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Find the invalid name for a variable

My_name

myName

1Name

My Name

@MyName

Answer explanation

Media Image

A variable can't have spaces between the words and numbers or symbols at the start.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code will not generate an error?

Firstname = input()

print("Hello,",firstname)

firstname = input()

print("Hello," firstname)

firstname = input()

print("Hello," ,firstname)

firstname = input ()

print("Hello, firstname")

Answer explanation

Media Image

This code is using concatenation!

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code will print "h"?

planet = "Earth"

print(planet[5])

planet = "Earth"

print(planet[4])

planet = "Earth"

print(planet,[4])

planet = "Earth"

print(planet,[5])

Answer explanation

Media Image

Python codes always start counting at 0!

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will this code print out? number = "5" + "10"

print(number)

15

5 10

510

An error

Answer explanation

Media Image

This code is a string and it will only print out 5 and 10 like 510. If you wanted it to be 15 then you wouldn't put the " ".

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type...

Holds alphanumeric data as texts

String

Float

Integer

Boolean

Answer explanation

Media Image

It's a string!

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Strings are represented in code as....

str

int

float

Answer explanation

Media Image

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?