wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to Python

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

Which of the following is the correct extension of the Python file?

a)

.python

b)

.pl

c)

.py

d)

.p

2.

Who developed Python programming language?

a)

Dennis Ritchie

b)

Bjarne Stroustrup

c)

Guido van Rossum

d)

Alan Turing

3.

Is Python primarily an interpreter or a compiler language?

a)

Compiler

b)

Interpreter

4.

Which of the following statements create a dictionary?

a)

d = {}

b)

d = {“john”:40, “peter”:45}

c)

d = {40:”john”, 45:”peter”}

5.

What will be the output of this Python statement?

a)

c

b)

ab

c)

cd

d)

ac

6.

What is a recommended strategy for learning and mastering Python syntax?

a)

Memorize every Python syntax rule and exception

b)

Consult ancient scrolls written by Python sages from centuries past

c)

Practice writing code regularly and experiment with different syntax constructs

d)

Enroll in a secret Python monastery where monks teach the ways of syntax enlightenment

7.

If you encounter a Python syntax error, what action should you take to troubleshoot the issue?

a)

Carefully review the error message and examine the code for mistakes

b)

Cast a spell of debugging and hope for a miracle

c)

Sacrifice a Pythonic goat to appease the syntax gods

d)

Perform a ritual dance around the code editor to ward off evil syntax spirits