3 Symbols in Data Science (part 1) (Math & Python) Flashcards
1 Name, use and example of =
Equality
5 = 2+3
5 is equal to 2+3
2 Name, use example and equivalent in Python of ≠
Inequality
5 ≠ 4
5 is not equal to 4
In Python:
!= 3!=4
2.1 Outcome of:
print(5!=4)
True
3 Name, use and example of ≈
approximation
x ≈ y
x is approximately equal to y
4 What does the /= operator mean in Python?
It’s an assignment operator shorthand for / and =
x /= 3 # equivalent to x = x / 3
4.1 Outcome of:
x = 1
x/=4
x
0.25
5 Name, use and example of >
greater than
5 > 4
5 is greater than 4
5.1 Outcome of:
5>4
True
6 Name, how to read and example of
less than
4 < 5
4 is less than 5
6.1 Outcome of:
5<4
False
7 Name, how to read, example, and equivalent in Python of≥
greater than or equal to
5 ≥ 4,
x ≥ y means x is greater than or equal to y
Python: 5>=4
Outcome of:
a =[0,0]
b=[0,1]
a>=b
False
8 Name, how to read, example, and equivalent in Python of ≤
less than or equal to
4 ≤ 5,
x ≤ y x is less than or equal to y
Python: 4<=4
8.1 Outcome of:
a =[0,0]
b=[0,1]
a<=b
9 Name, use in Maths and Python and examples of: ( )
Parentheses
Maths:order of operation. calculate expression inside first
Python: order of operation, tuples, generator expressions, function calls and other syntax
2 × (3+5) = 16
a=(1,4,5) #tuple (unchangeable)
9.1 Outcome of:
print(2* (3+5) )
print(2*3+5)
16
11
10 Name, use in Maths and Python and examples of:[ ]
Brackets
Maths: order of operations.calculates expression inside first
Python: order of operation, to define mutable data types - lists, list comprehensions and for indexing/lookup/slicing
10.1 Outcome of:
print[2* [3+5] ]
TypeError: ‘builtin_function_or_method’ object is not subscriptable
11 Name and read: +
1 + 1 = 2
Addition
One plus one equals two
1 + 1 = 2
12 Name and read: −
Subtraction
2 − 1 = 1
Two minus one equals one
13 Name and example of: ±
plus and minus
3 ± 5 = 8 or -2
14 Name and example of: ±
±
minus - plus
both minus and plus operations
3 ∓ 5 = -2 or 8
15 Name,use,read and Python uses of *
2 * 3 = 6
Asterisk
Multiplication
2 * 3 = 6
Two multiplied by three is equal to six
Python: Multiplication and unpacking
16 Name,use of ⋅
Multiplication dot
2 ⋅ 3 = 6
17 Name,use,read of:÷
6 ÷ 2 = 3
Division sign
Six divided by 2 equals three
18 Name and use in Maths and Python of /
Slash
Maths: Division
Python: Division, for file paths
6 / 2 = 3
p = PurePath(‘/etc’)
18 Name and use of —
horizontal line
division / fraction
19 Name and use of % in Maths and Python
Maths: Percentage
Python:Modulo
Python: remainder calculation
Python: 7%2 = 1
Maths: 1% = 1/100
10% × 30 = 3
20 Name and use of .
Period, decimal point, decimal separator
2.56 = 2+56/100
21 Name and use of a^b
Power Exponent
2^3 = 8
22 Name and use of a^b
Caret
Exponent
2 ^ 3 = 8
22 Name and use of √a
square root
√a ⋅ √a = a
√9 = ±3
22 Name and use of 3√a
cube root
3√a ⋅ 3√a ⋅ 3√a = a
3√8 = 2
23 Name and use of n√a
n-th root (radical)
for n=3, n√8 = 2
23.1 Calculate for n=7, n√8 = 2
#Answer: n = 7 8**(1/n)
24 Name and use of ‰
Per-mille
1‰ = 1/1000 = 0.1%
10‰ × 30 = 0.3
25 Name and use of ppm
Per-million
26 Name and use of ppb
Per-billion
1ppb = 1/1000000000
10ppb × 30 = 3×10^-7
27 Name and use of ∠
Angle
formed by two rays
∠ABC = 30°
28 Name and use of °
Degree
1 turn = 360°
α = 60°
29 Name and use of deg
Degree
1 turn = 360deg
α = 60deg
30 Name and use of ≅
congruent to
equivalence of geometric shapes and size
∆ABC≅ ∆XYZ
31 Name and use of ~ (geometry)
Similarity
same shapes, not same size
∆ABC~ ∆XYZ
32 Name and use of Δ
Triangle
triangle shape
ΔABC≅ ΔBCD
33 Name and use of |x-y|
Distance
distance between points x and y
x-y | = 5
34 Name and use of π
pi constant
π = 3.141592654…
c = π⋅d = 2⋅π⋅r
35 Name and use of rad
Radians
radians angle unit
360° = 2π rad
36 Name and use of c
Radians
radians angle unit
360° = 2π c
37 Name and use of x
x variable
unknown value to find
when 2x = 4, then x = 2
38 Name of ≡
Equivalence
identical to
39 Use of ≜
equal by definition
40 Name of:=
equal by definition
Python: walrus operator
41 Name and use of ~
approximately equal
11 ~ 10
42 Name and use of ≈
approximately equal
Approximation
sin(0.01) ≈ 0.01
43 Name and use of ∝
proportional to
y ∝ x when y = kx, k constant
44 Name of ∞
Lemniscate
infinity symbol
45 Name and use of ≪
much less than
1 ≪ 1000000
46 Name and use of ≫
much greater than
1000000 ≫ 1
47 Name and use of {}
name: Braces
{1, 3, 4}
Braces
Python: use for sets
e.g.
print(‘name: Braces’)
_set={1,3,4,4,4}
_set
47.1 What is a set?
Set is an unordered collection data type that is iterable, mutable and has no duplicate elements
48 Name and use of ⌊x⌋
Floor brackets
rounds number to lower integer
⌊4.3⌋ = 4
49 Name and use of ⌈x⌉
Ceiling brackets
rounds number to upper integer
⌈4.3⌉ = 5
50 Name and use of x!
Exclamation mark
Factorial
4! = 123*4 = 24
50.1 Code to get factorial :
enter a number to compute its factorial:4
num =int(input (‘enter a number to compute its factorial:’))
factorial = 1
for i in range(1,num + 1):
factorial = factorial*i
print(factorial)
51 Name and use of | x |
vertical bars
absolute value
-5 | = 5
52 Name and use of f(x)
function of x maps values of x to f(x)
f (x) = 3x+5
53 Name and use of (f ∘ g)
function composition (f ∘ g) (x) = f (g(x))
f (x)=3x,g(x)=x-1 ⇒(f ∘ g)(x)=3(x-1)
54 Name and use of(a,b)
open interval (a,b) = {x | a < x < b}
x∈ (2,6)
55 Name and use of[a,b]
closed interval
[a,b] = {x | a ≤ x ≤ b}
x ∈ [2,6]
56 Name and use of ∆
Delta
change / difference
∆t = t1 - t0
57 Name and use of ∑
Sigma
summation - sum of all values in range of series
∑ xi= x1+x2+…+xn
58 Name and use of ∑∑
Sigma
double summation
∑+∑
59 Name and use of ∏
capital pi
product - product of all values in range of series
∏ xi=x1∙x2∙…∙xn
60 Name and use of e
Euler’s number
e = 2.718281828…
e = lim (1+1/x)x , x→∞
61 Name of γ
Euler-Mascheroni constant
γ = 0.5772156649…
62 Name and use of ·
Dot
scalar product
a · b
63 Name and use of ×
Cross
vector product
a × b
64 Name and use of ⊗
tensor product
tensor product of A and B
A ⊗ B
65 Name and use in Maths and Python of [ ]
Brackets
- Maths: Matrix of numbers
- Python: Used to define mutable data types - lists, list comprehensions and for indexing/lookup/slicing
65 Name and use in Maths and Python of ( )
Parentheses
matrix of numbers
66 Name of | A |
Determinant
67 Name of det(A)
Determinant
determinant of matrix A
68 Name of || x ||
double vertical bars
norm of that vector
(Norm or Magnitude of denoted is defined as the length or magnitude of the vector)
69 Name and use of A^T
Transpose
matrix transpose
(A^T)ij = (A)ji
70 Name of A -1
inverse matrix
71 Name and use of dim(U)
Dimension
dimension of matrix A
dim(U) = 3
72 Name and use of P(A)
probability function
probability of event A
P(A) = 0.5
73 Name and use of P(A ⋂ B)
probability of events intersection
probability that of events A and B
P(A⋂B) = 0.5
74 Name and use of P(A ⋃ B)
probability of events union
probability that of events A or B
P(A⋃B) = 0.5
75 Name of φ
golden ratio constant