Python Revision

Python Revision

8th Grade

16 Qs

quiz-placeholder

Similar activities

Синтаксис Python

Синтаксис Python

7th - 11th Grade

21 Qs

Print, Variables, and Input

Print, Variables, and Input

8th Grade

19 Qs

Quiz sobre Python

Quiz sobre Python

8th Grade

15 Qs

Data types and Input

Data types and Input

7th - 9th Grade

14 Qs

Diagnostic Assessment Python

Diagnostic Assessment Python

8th - 11th Grade

20 Qs

Python_2R

Python_2R

KG - Professional Development

20 Qs

Python-Basic

Python-Basic

3rd Grade - University

15 Qs

2) Python Variables

2) Python Variables

8th - 11th Grade

15 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?