Python Revision

Python Revision

8th Grade

16 Qs

quiz-placeholder

Similar activities

Code.org Express Course -> Lesson 10

Code.org Express Course -> Lesson 10

5th - 8th Grade

19 Qs

The hidden network that makes the internet possible

The hidden network that makes the internet possible

6th - 8th Grade

20 Qs

Computer

Computer

5th - 8th Grade

20 Qs

Microbit (python)

Microbit (python)

8th - 10th Grade

15 Qs

Google Docs

Google Docs

6th - 8th Grade

15 Qs

Python

Python

7th - 9th Grade

12 Qs

VIII - Computer

VIII - Computer

8th Grade

20 Qs

Selection

Selection

5th - 9th Grade

20 Qs

Python Revision

Python Revision

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Chloe Wilkes

Used 19+ times

FREE Resource

AI

Enhance your content in a minute

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

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

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?

Discover more resources for Computers