Search Header Logo

Python Basics Quiz

Authored by John Streety

Computers

5th Grade

Python Basics Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to print 'Hello, World!' in Python?

System.out.println('Hello, World!')

print('Hello, World!')

echo 'Hello, World!'

printf('Hello, World!')

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol is used to start a comment in Python?

#

//

/*

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable in Python?

x = 5

x := 5

int x = 5

var x = 5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? if 5 > 2: print('Five is greater than two!')

5 > 2

Nothing

Syntax Error

Five is greater than two!

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the file extension for Python files?

.pyt

.python

.pt

.py

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you skip indentation in Python?

Warning

The code will run but with a different output

Nothing

Syntax Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many spaces are most commonly used for indentation in Python?

8

2

4

1

Access all questions and much more by creating a free account

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?