wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

SEM-2(Python-Q1)

Total questions: 15

Worksheet time: 6mins

Name
Class
Date
1.

What will the output be from the following code? Print (“Hello world!”)

a)

SyntaxError

b)

“Hello world!”

c)

Hello world!

d)

Print (Hello world!)

2.

Which of the following is a correctly-formatted comment?

a)

&comment

b)

“”Comment””

c)

!comment

d)

#comment

3.

What does term ‘debug’ mean:

a)

looking at the code

b)

a set of instructions

c)

Identify errors and fix them

d)

Making a calculation

4.
What kind of programming language is Python?
a)
High Level  & Object Orientated
b)
Low Level & Object Orientated
c)
High Level & Procedural
d)
Low Level & Procedural
5.
Which of the following is correct?
a)
The Python interpreter ignores comments
b)
Comments are used by programmers for a better understanding of the program
c)
You use the # symbol before a comment
d)
All of the above
6.

Python (TM) is owned and managed by

a)

Microsoft (c)

b)

Sun Microsystems (c)

c)

Python (TM) is open source and free to use

d)

Google (c)

7.

Python is ___________ level programming language and is ___________.

a)

High, compiled

b)

High, interpreted

c)

Low, compiled

d)

Low, interpreted

8.

Generally speaking, a low level programming language is easier to read, write and maintain over a high level programming language

a)

True

b)

False

9.

A disadvantage of Python is it is harder to debug than other higher level programming languages.

a)

True

b)

False

10.

Examples of program translators

a)

Compilers

b)

Interpreters

c)

Assemblers

d)

All the above

11.

What is IDE?

a)

Integrated Development Environment

b)

Implicit Deployment Environment

c)

Interrogated Development Environment

12.

Binary operators use _____ operands and unary operators use _____ operand

a)

one, one

b)

two, one

c)

two, two

d)

three, two

13.

What is the correct extension for python files ?

a)

.py

b)

.pyth

c)

.python

14.

How is a block of code defined in Python ?

a)

with indentation

b)

with paranthesis

c)

with curly braces

15.
What extension must you add to the end of a file when saving?
a)
.xlsx
b)
.pptx
c)
.docx
d)
.py