-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_types.py
More file actions
18 lines (14 loc) · 765 Bytes
/
data_types.py
File metadata and controls
18 lines (14 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# When more than one operator appears in an expression, the order of evaluation
# depends on the rules of precedence. For mathematical operators, Python follows
# mathematical convention. The acronym PEMDAS is a useful way to remember
# the rules:
# PEMDAS -> Parenthesis, exponentation ( multiplication), M -> Multiplication D -> Division and A -> Addition , S -> Subtraction
# Multiplication and Division have same precendence.
# Data types are int, str, float
this_is_an_int = 12
this_is_an_float = 123.45
this_is_an_string = "Hello"
print("{}{}{}{}{}{}".format(" 12 is", type(this_is_an_int), "\n 123.45 is::", type(this_is_an_float), "\n Hello is::",
type(this_is_an_string)))
# Empty dictionary declaration
empty_dict = dict()