Section 1

Preview this deck

example = {"name":"Sam", "age": 50}

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (11)

Section 1

(11 cards)

example = {"name":"Sam", "age": 50}

Front

a dictionary aka hashmap

Back

for n in range(len(example))

Front

for loop, repeat length of example times

Back

for n in range(10)

Front

for loop, repeat from 0 to 9

Back

def

Front

defining a function

Back

example = input( )

Front

initialise the value of example with the input typed in by the user.

Back

print ( )

Front

prints the content of the brackets

Back

import

Front

load additional libraries to perform special jobs

Back

while (n < 10):

Front

while loop, repeat until n is larger than 10

Back

example = [1,2,3,4]

Front

an array of ints

Back

return

Front

used inside a function to return a value and exit the function.

Back

int(x)

Front

for casting a variable to interger

Back