Python Basics Quiz

Python Basics Quiz

5th - 10th Grade

30 Qs

quiz-placeholder

Similar activities

Binary Trivia Quiz

Binary Trivia Quiz

6th - 8th Grade

25 Qs

Communications skills " Hospitality Industry"

Communications skills " Hospitality Industry"

9th - 12th Grade

27 Qs

Tech Apps Vocabulary Test #3 (Terms 1 - 309)

Tech Apps Vocabulary Test #3 (Terms 1 - 309)

8th Grade

25 Qs

MODUL 4 TEKNIK DASAR PROSES PRODUKSI

MODUL 4 TEKNIK DASAR PROSES PRODUKSI

10th Grade

25 Qs

Test 6, News and Media Literacy

Test 6, News and Media Literacy

5th - 9th Grade

25 Qs

Examen Trimestral Programación décimo

Examen Trimestral Programación décimo

10th Grade

25 Qs

(T) CF1.U5: 7th/Word Processing Proofreader

(T) CF1.U5: 7th/Word Processing Proofreader

7th Grade

25 Qs

Oxy Acetylene

Oxy Acetylene

9th - 12th Grade

25 Qs

Python Basics Quiz

Python Basics Quiz

Assessment

Quiz

Instructional Technology

5th - 10th Grade

Hard

Created by

Klea h

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What will be the output of the following code?

# This is a comment

#print("Hello, World!")

This is a comment

Hello, World!

# This is a comment

Hello, World!

No output

Error

2.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is the correct way to write a multiline comment in Python?

/* This is a comment */

// This is a comment

# This is a comment

"""This is a comment"""

3.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What is the data type of the user input in the code below?

x = input("Enter a number: ")

int

float

str

bool

4.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which line correctly converts the input to an integer?

x = str(input())

x = float(input())

x = int(input())

x = input(int())

5.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

What will be the result of the following code?

x = 5 y = "3" print(x + int(y))

8

53

Error

5 + "3"

6.

MULTIPLE CHOICE QUESTION

1 min • 2 pts

Which of the following is a valid variable?

2name = "John"

full-name = "John"

running_total = 123

my class = 123

7.

FILL IN THE BLANK QUESTION

1 min • 2 pts

Complete the code to print: My name is Ben and I am 13 years old.?

name = "Ben"

age = 13

print(________________)

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 Instructional Technology