Python Revision

Python Revision

8th Grade

16 Qs

quiz-placeholder

Similar activities

Unpuzzled ASCII

Unpuzzled ASCII

7th - 12th Grade

15 Qs

HTML Quiz 1 Review

HTML Quiz 1 Review

7th - 12th Grade

11 Qs

Soal Posttest TKP (TIK)

Soal Posttest TKP (TIK)

KG - Professional Development

20 Qs

Tech Trivia, Part III

Tech Trivia, Part III

7th - 12th Grade

20 Qs

CSE1 Unit 2 Assessment

CSE1 Unit 2 Assessment

6th - 8th Grade

15 Qs

Bermain Gambar

Bermain Gambar

1st Grade - Professional Development

15 Qs

ptscod

ptscod

8th Grade

20 Qs

Spreadsheet

Spreadsheet

8th Grade - University

20 Qs

Python Revision

Python Revision

Assessment

Quiz

Computers

8th Grade

Practice Problem

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

Already have an account?