Built-in Functions
Evaluate Expression
Trivia
100

What is the purpose of the "sorted" function?

Sorts

100

1 == 2 and 2 == 2

False

100

Which standard Python library provides the "log" function?

math

200

What is the purpose of the "type" function?

gives you the type of the object

e.g. type(3) is <class 'int'>

200

3.0 // 3 + 3 % 2

2.0

200

Convert the binary number 1010 to decimal.

10

300

What is the purpose of the "id" function?

Returns the identity of an object

300

max([1,2,3], key=lambda x: 1/x)

1

300

What does CPU stand for?

Central Processing Unit

400

What is the purpose of the "zip" function?

Aggregates elements from multiple iterables into a single iterator of tuples

400

"running"[:2:-2]

"gi"

400

Name 2 naming conventions with an example of each.

snake_case

CamelCase

ALL_CAPS


500

What is the purpose of the "enumerate" function?

Allows you to iterate over a sequence and keep track of the index at the same time

500

(2 or 1 and 0) * "PASS"

"PASSPASS"

500

ASCII Character represents English letters, digits, punctuation, and control characters. How many standard ASCII characters are there?

128

M
e
n
u