Page 6
•
•
•
•
•
•
•
•
•
•
Page 16
• 1 2 3 100 13151 0
• 1.5 2.048128 3.000001
• "Hi! I’m Alessio Vaccaro"
• [1, 2, 7, 10]
• (1, 2, 7, 10)
• { "age":"28", "hair":"none" }
• True False
Page 17
11
type() integer
Page 18
string my_string
string [x]
string [:x] [x:]
type()
Page 19
list my_list 1 2 3
[x]
Page 22
list[x]
list[x] = value
Page 24
list tuple list tuple
Page 25
my_dict dictionary
values keys
“name” “Alessio”“age” 28
Page 26
value dictionary key
keys dictionary
Page 27
keys dictionary
keys() keys dictionary
Page 30
if
if hot:open_the_window
if BOOLEAN_EXPRESSION:STATEMENT
Page 31
if valueToCheck 22
valueToCheck > 22 True
Page 32
if True False
if-else
Page 34
forlist for
for list listOfNumbers
Page 35
range()
for list range()
Page 38
while BOOLEAN_EXPRESSION True
while BOOLEAN_EXPRESSION:STATEMENT
Page 39
while
number = number - 1
Page 50
function
function
def my_function(argument1):
do_something_with_my_argument1
return(result)
Page 55
module functions
module library
module “time” functions
Page 56
math module
sin function math module
Page 57
module “math”
math.pi math.sin()
pi math sin()
Functions attributes
Page 58
module “random”
rand.int() function
Page 59
attribute/function module
dir() function