Professional Documents
Culture Documents
Introduction To Programming For Beginners: Allan Martell
Introduction To Programming For Beginners: Allan Martell
For Beginners
Allan Martell
RECAP
RECAP
1) What's a value?
RECAP
1) What's a value?
2) What's a data type?
RECAP
1) What's a value?
2) What's a data type?
3) Which are the four data types?
RECAP
1) What's a value?
2) What's a data type?
3) Which are the four data types?
Exercise:
1) Create a folder on the desktop called 'programming'
2) Open IDLE and create a script. Name it variables.py
and save it within the 'programming' folder
VARIABLES
VARIABLES
'Boxes' to store values of a particular data type
VARIABLES
'Boxes' to store values of a particular data type
In order to create a variable we follow two steps:
VARIABLES
'Boxes' to store values of a particular data type
In order to create a variable we follow two steps:
Declaration. Assigning a
name to the variable.
VARIABLES
'Boxes' to store values of a particular data type
In order to create a variable we follow two steps:
Strings are sequences of characters wrapped in double quotation
marks (“”)
STRINGS
Strings are sequences of characters wrapped in double quotation
marks (“”)
Declaration. Assigning a
name to the variable.
first_name =
last_name =
STRINGS
Strings are sequences of characters wrapped in double quotation
marks (“”)
first_name = “Allan”
last_name = “Martell”
STRINGS
Strings are sequences of characters wrapped in double quotation
marks (“”)
first_name = “Allan”
last_name = “Martell”
Strings are sequences of characters wrapped in double quotation
marks (“”)
first_name = “Allan”
last_name = “Martell”
A value that can be either True or False
BOOLEANS
A value that can be either True or False
Declaration. Assigning a
name to the variable.
tuesday =
attentive =
BOOLEANS
A value that can be either True or False
tuesday = False
attentive = True
BOOLEANS
A value that can be either True or False
tuesday = False
attentive = True
A value that can be either True or False
tuesday = False
attentive = True
Declaration. Assigning a
name to the variable.
x=
y=
INTEGER
x= 8
y = 11
INTEGER
x= 8
y = 11
Floating point numbers, or non-integer numbers, such as 5.0, or 4.5
FLOATS
Floating point numbers, or non-integer numbers, such as 5.0, or 4.5
Declaration. Assigning a
name to the variable.
a=
b=
FLOATS
Floating point numbers, or non-integer numbers, such as 5.0, or 4.5
a= 4.67
b= 1.0
FLOATS
Floating point numbers, or non-integer numbers, such as 5.0, or 4.5
a= 4.67
b= 1.0
Floating point numbers, or non-integer numbers, such as 5.0, or 4.5
a= 4.67
b= 1.0
Declaration
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
Declaration Initialization
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
name =
last_name =
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
name = “Allan”
last_name = “Martell”
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
is_day =
at_ilab =
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
is_day = False
at_ilab = True
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x =
y =
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x = 7
y = 22
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x = 7 Integer
y = 22 Integer
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x = 7 Integer
y = 22 Integer
a =
b =
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x = 7 Integer
y = 22 Integer
a = 6.78
b = 0.5
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x = 7 Integer
y = 22 Integer
a = 6.78 Float
b = 0.5 Float
CONCLUSION
When initializing a variable, you can assign it one of the different data
types:
x = 7 Integer
y = 22 Integer
a = 6.78 Float
b = 0.5 Float
– Five Integers
– Five Floating-Points
– Five Strings
– Five Booleans