Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

iav ML Study Group Pop Quiz 3

Total questions: 15

Worksheet time: 30mins

Name
Class
Date
1.

Python was created by...

a)

Guido van Rossum

b)

Larry Wall

c)

Ada Lovelace

d)

Dennis Ritchie

2.

The latest DEVELOPMENT version of Python is...

(a)  

3.

a=3

b=5

a=b

a=?

a)

3

b)

5

4.

The first work on Python was done in the year:

a)

1989

b)

1991

c)

1965

d)

2004

5.

Which of the following Python data structures are IMMUTABLE?

a)

Strings

b)

Lists

c)

Sets

d)

Dictionaries

e)

Tuples

6.

def foo_function (billvar,bobvar):

In the example function above, "billvar" and "bobvar" are:

a)

Arguments

b)

Constructs

c)

Strings

d)

Hyperparameters

7.

Python if statements allow for the keywords "if", "else" and:

(a)  

8.

I have a numeric variable, x, and I want to CUBE it (raise it to the power of 3). What is the built-in operation for this in Python?

a)

x=x*x*x

b)

x=x^3

c)

x=x**3

d)

x=numpy.cube(x)

9.

Write the boolean expression for "x not equal to y"

(a)  

10.

antique_coins = ['obol', 'denarius', 'rouble', 'shekel', 'daric', 'cash', 'dirham', 'nummus']


Given the list of antique coins above, write a list comprehension which will create a new list called s_coins which will only include coins which contain the letter 's' in their names.


This question is ungraded! Please save your answer for discussion later.

4 lines
11.

Python is a(n) _______ language.

a)

interpreted

b)

compiled

c)

pre-compiled

d)

ROM-encoded

e)

abstract

12.

What is the difference between a single quote mark ' and a double quote mark " in python?

a)

Single quotes are for strings, double quotes are for regular expressions

b)

Trick question: Python does not distinguish between single and double quotes.

c)

Single quotes are allowed, double quotes will cause an unreadable sigil error

d)

Single quotes use less RAM as they are half as complex to represent

13.

Which of the following is NOT a default numeric type in Python?

a)

int, integers

b)

float, floating-point numbers

c)

complex, imaginary numbers

d)

UInt128, unsigned 128-bit integers

14.

"Docstrings" in Python are:

a)

A string which occurs in the first statement of a module, which can then be accessed by calling the __doc__ attribute of that module.

b)

A special type of string which can only be used to write documentation

c)

Trick question: Docstrings do not exist in Python

d)

Simply another name for the normal string type

15.

If you have to create several different projects, using several different point versions of Python and its packages, it would be easiest to organize them with:

a)

venvs, Virtual Environments

b)

penvs, Prototyping Environments

c)

denvs, Development Environments

d)

xenvs, eXtensible Environments

e)

grenvs, Gruesome Environments