SlideShare a Scribd company logo
1 of 68
Maths and Programming
Omar Bashir
Introduction
Studied at College of Aeronautical Engineering,
PAF Academy Risalpur.
Graduated as an avionics systems engineer.
Further Education
Further Education
MSc IT (Electronic Communications) 1995
PhD (Network Performance Monitoring) 1998
Research on monitoring parts of the Internet
owned by British Telecom on how well they
perform.
Current Professional Focus
Financial Technology
My First Computer
Casio PB-100F
BASIC programming language
544 bytes of memory
As opposed to 1 gigabytes of a simple netbook
1 gigabytes = 1073741824 bytes
Programs and Data
Data are numbers, alphabets, movies,
pictures and sound.
Inside a computer all of them are stored as
numbers.
Programs tell the computer how to treat
those numbers, i.e., as alphabets, numbers,
movies, pictures or sound.
Programs
List of instructions that execute on data.
Data that programs process is stored in
variables.
Variables are memory locations which are
given identifiable names.
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
a
b
sum
diff
prod
div
Enter a:
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6a
b
sum
diff
prod
div
Enter a: 6
Enter b:
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
a
b
sum
diff
prod
div
Enter a: 6
Enter b: 2
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
a
b
sum
diff
prod
div
Enter a: 6
Enter b: 2
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
a
b
sum
diff
prod
div
Enter a: 6
Enter b: 2
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
diff
prod
div
Enter a: 6
Enter b: 2
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
Enter a: 6
Enter b: 2
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
Enter a: 6
Enter b: 2
sum =
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
Enter a: 6
Enter b: 2
sum = 8
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
Enter b: 2
sum = 8
diff =
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
Enter b: 2
sum = 8
diff = 4
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
sum = 8
diff = 4
prod =
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
sum = 8
diff = 4
prod = 12
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
diff = 4
prod = 12
div =
Memory
My First Program
Input "Enter a:", a
Input "Enter b:", b
sum = a + b
diff = a - b
prod = a * b
div = a/b
Print "sum = ";
Print sum
Print "diff = ";
Print diff
Print "prod = ";
Print prod
Print "div = ";
Print div
6
2
8
4
12
a
b
sum
3
diff
prod
div
diff = 4
prod = 12
div = 3
Memory
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mean = Sum of all the numbers divided by
the count = 37/12 = 3.083
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mean = Sum of all the numbers divided by
the count = 37/12 = 3.083
Median = Average of the numbers in the
middle of the sorted list of values.
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mean = Sum of all the numbers divided by
the count = 37/12 = 3.083
Median = Average of the numbers in the
middle of the sorted list of values.
1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 7
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mean = Sum of all the numbers divided by
the count = 37/12 = 3.083
Median = Average of the numbers in the
middle of the sorted list of values.
1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 7
Median = 3
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mode = The number that occurs the most.
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mode = The number that occurs the most.
Number Count
1
2
3
4
7
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mode = The number that occurs the most.
Number Count
1 1
2 3
3 5
4 2
7 1
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mode = The number that occurs the most.
Number Count
1 1
2 3
3 5
4 2
7 1
Mean, Median, Mode
7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
Mode = The number that occurs the most.
Mode = 3
Number Count
1 1
2 3
3 5
4 2
7 1
A Python Program to Compute
Meandata = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
done
Memory
data
input
sum
value
mean
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
done
Memory
data
input
sum
value
mean
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end:
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end: 3
3
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end: 3
3
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end: 3
3
3
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end: 3
3
3
Enter a number of 'n' to end:
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end: 3
1
3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
Enter a number of 'n' to end: 3
1
3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
1
3 1
Enter a number of 'n' to end: 3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
1
3 1
Enter a number of 'n' to end:
Enter a number of 'n' to end: 3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
2
3 1
Enter a number of 'n' to end: 2
Enter a number of 'n' to end: 3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
2
3 1
Enter a number of 'n' to end: 2
Enter a number of 'n' to end: 3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
2
3 1 2
Enter a number of 'n' to end: 2
Enter a number of 'n' to end: 3
Enter a number of 'n' to end: 1
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
2
3 1 2
Enter a number of 'n' to end:
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
n
3 1 2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Falsedone
Memory
data
input
sum
value
mean
n
3 1 2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
0.0
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
0.0
3
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
3.0
3
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
3.0
1
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
4.0
1
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
4.0
2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
6.0
2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
6.0
2
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
6.0
2
2.0
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 1
Enter a number of 'n' to end: 2
data = list()
done = False
while (not done):
input = raw_input("Enter a number or 'n' to end:
")
if (input != "n"):
data.append(int(input))
else:
done = True
print(data)
sum = 0.0
for value in data:
sum = sum + value
mean = sum/len(data)
print(mean)
Truedone
Memory
data
input
sum
value
mean
n
3 1 2
6.0
2
2.0
Enter a number of 'n' to end: n
Enter a number of 'n' to end: 2
2.0
Key Lessons
Computers are not intelligent or smart,
humans are.
Computer follow instructions listed as
programs to perform tasks.
Computers are much faster than humans in
following instructions.
All operations within a computer are either
arithmetic or logical.
The Future
Data and information driven.
Need for speed, the faster you can find,
process and analyse data you need, the
more successful you are.
You will need to use computers efficiently to
get that advantage.
Most jobs in the next 30 years will require
some level of programming.
The Future
“Sometime in the future, the trading floor of
the London Stock Exchange will only be
occupied by a computer, a man and a dog.
The dog will guard the computer, the man
will feed the dog and the computer will
conduct the business”, Anonymous
Maths with Programming

More Related Content

Viewers also liked

Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...
Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...
Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...Yandex
 
Hypergraph Mining For Social Networks
Hypergraph Mining For Social NetworksHypergraph Mining For Social Networks
Hypergraph Mining For Social NetworksGiacomo Bergami
 
Maths Games & Videos
Maths Games & VideosMaths Games & Videos
Maths Games & VideosSuhaila
 
Statistics used in Cricket
Statistics used in Cricket Statistics used in Cricket
Statistics used in Cricket Makhan Dey
 
Graph coloring and_applications
Graph coloring and_applicationsGraph coloring and_applications
Graph coloring and_applicationsmohammad alkhalil
 
Application of graph theory in drug design
Application of graph theory in drug designApplication of graph theory in drug design
Application of graph theory in drug designReihaneh Safavi
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphsTech_MX
 
Pascal’s triangle and its applications and properties
Pascal’s triangle and its applications and propertiesPascal’s triangle and its applications and properties
Pascal’s triangle and its applications and propertiesJordan Leong
 
Football and graph theory
Football and graph theoryFootball and graph theory
Football and graph theoryUmang Aggarwal
 
Applications of maths in our daily life
Applications of maths in our daily lifeApplications of maths in our daily life
Applications of maths in our daily lifeAbhinav Somani
 

Viewers also liked (15)

Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...
Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...
Dmitry Shabanov – Improved algorithms for colorings of simple hypergraphs and...
 
Graph Coloring using Peer-to-Peer Networks
Graph Coloring using Peer-to-Peer NetworksGraph Coloring using Peer-to-Peer Networks
Graph Coloring using Peer-to-Peer Networks
 
Hypergraph Mining For Social Networks
Hypergraph Mining For Social NetworksHypergraph Mining For Social Networks
Hypergraph Mining For Social Networks
 
Cell division and pascal triangle
Cell division and pascal triangleCell division and pascal triangle
Cell division and pascal triangle
 
Careers
CareersCareers
Careers
 
Maths Games & Videos
Maths Games & VideosMaths Games & Videos
Maths Games & Videos
 
Statistics used in Cricket
Statistics used in Cricket Statistics used in Cricket
Statistics used in Cricket
 
Graph coloring and_applications
Graph coloring and_applicationsGraph coloring and_applications
Graph coloring and_applications
 
Application of graph theory in drug design
Application of graph theory in drug designApplication of graph theory in drug design
Application of graph theory in drug design
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
Pascal’s triangle and its applications and properties
Pascal’s triangle and its applications and propertiesPascal’s triangle and its applications and properties
Pascal’s triangle and its applications and properties
 
Football and graph theory
Football and graph theoryFootball and graph theory
Football and graph theory
 
Maths in cricket
Maths in cricketMaths in cricket
Maths in cricket
 
Pascal Triangle
Pascal TrianglePascal Triangle
Pascal Triangle
 
Applications of maths in our daily life
Applications of maths in our daily lifeApplications of maths in our daily life
Applications of maths in our daily life
 

Similar to Maths with Programming

Python programming workshop session 4
Python programming workshop session 4Python programming workshop session 4
Python programming workshop session 4Abdul Haseeb
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solutionyogini sharma
 
C programs
C programsC programs
C programsMinu S
 
Simple C programs
Simple C programsSimple C programs
Simple C programsab11cs001
 
Yolygambas
YolygambasYolygambas
Yolygambasrosyp
 
03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developer03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developerAndrea Antonello
 
Torchbearersnotebook.blogspot.com program to create a list in python and valu...
Torchbearersnotebook.blogspot.com program to create a list in python and valu...Torchbearersnotebook.blogspot.com program to create a list in python and valu...
Torchbearersnotebook.blogspot.com program to create a list in python and valu...SAKSHISINGH486
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3Abdul Haseeb
 
Pythonlearn-03-Conditional.pptx
Pythonlearn-03-Conditional.pptxPythonlearn-03-Conditional.pptx
Pythonlearn-03-Conditional.pptxVigneshChaturvedi1
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manualkamesh dagia
 

Similar to Maths with Programming (20)

Python programming workshop session 4
Python programming workshop session 4Python programming workshop session 4
Python programming workshop session 4
 
901131 examples
901131 examples901131 examples
901131 examples
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solution
 
C programs
C programsC programs
C programs
 
Simple C programs
Simple C programsSimple C programs
Simple C programs
 
Yolygambas
YolygambasYolygambas
Yolygambas
 
Yolygambas
YolygambasYolygambas
Yolygambas
 
Yolygambas
YolygambasYolygambas
Yolygambas
 
Cpl
CplCpl
Cpl
 
03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developer03 Geographic scripting in uDig - halfway between user and developer
03 Geographic scripting in uDig - halfway between user and developer
 
C-LOOP-Session-2.pptx
C-LOOP-Session-2.pptxC-LOOP-Session-2.pptx
C-LOOP-Session-2.pptx
 
Torchbearersnotebook.blogspot.com program to create a list in python and valu...
Torchbearersnotebook.blogspot.com program to create a list in python and valu...Torchbearersnotebook.blogspot.com program to create a list in python and valu...
Torchbearersnotebook.blogspot.com program to create a list in python and valu...
 
python codes
python codespython codes
python codes
 
Python programming workshop session 3
Python programming workshop session 3Python programming workshop session 3
Python programming workshop session 3
 
C
CC
C
 
Python programs
Python programsPython programs
Python programs
 
Hargun
HargunHargun
Hargun
 
python programs .docx
python programs .docxpython programs .docx
python programs .docx
 
Pythonlearn-03-Conditional.pptx
Pythonlearn-03-Conditional.pptxPythonlearn-03-Conditional.pptx
Pythonlearn-03-Conditional.pptx
 
25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual25422733 c-programming-and-data-structures-lab-manual
25422733 c-programming-and-data-structures-lab-manual
 

More from Omar Bashir

Cloud migration challenges london ct os
Cloud migration challenges   london ct osCloud migration challenges   london ct os
Cloud migration challenges london ct osOmar Bashir
 
5 Software Development Lessons From a Mountaineer
5 Software Development Lessons From a Mountaineer5 Software Development Lessons From a Mountaineer
5 Software Development Lessons From a MountaineerOmar Bashir
 
Technology Agility
Technology AgilityTechnology Agility
Technology AgilityOmar Bashir
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality LoopbackOmar Bashir
 
Achieving Technological Agility
Achieving Technological AgilityAchieving Technological Agility
Achieving Technological AgilityOmar Bashir
 
Technical Debt: Measured and Implied
Technical Debt: Measured and ImpliedTechnical Debt: Measured and Implied
Technical Debt: Measured and ImpliedOmar Bashir
 
Distilling Agile for Effective Execution
Distilling Agile for Effective ExecutionDistilling Agile for Effective Execution
Distilling Agile for Effective ExecutionOmar Bashir
 
Authorisation: Concepts and Implementation
Authorisation: Concepts and ImplementationAuthorisation: Concepts and Implementation
Authorisation: Concepts and ImplementationOmar Bashir
 
Coding for 11 Year Olds
Coding for 11 Year OldsCoding for 11 Year Olds
Coding for 11 Year OldsOmar Bashir
 
High Speed Networks - Applications in Finance
High Speed Networks - Applications in FinanceHigh Speed Networks - Applications in Finance
High Speed Networks - Applications in FinanceOmar Bashir
 
Functional Programming in Java 8
Functional Programming in Java 8Functional Programming in Java 8
Functional Programming in Java 8Omar Bashir
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeOmar Bashir
 
Computing at Schools: A Guide to Parents
Computing at Schools: A Guide to ParentsComputing at Schools: A Guide to Parents
Computing at Schools: A Guide to ParentsOmar Bashir
 
Information technology
Information technologyInformation technology
Information technologyOmar Bashir
 
Code Club Talk 2014
Code Club Talk 2014Code Club Talk 2014
Code Club Talk 2014Omar Bashir
 

More from Omar Bashir (17)

Cloud migration challenges london ct os
Cloud migration challenges   london ct osCloud migration challenges   london ct os
Cloud migration challenges london ct os
 
5 Software Development Lessons From a Mountaineer
5 Software Development Lessons From a Mountaineer5 Software Development Lessons From a Mountaineer
5 Software Development Lessons From a Mountaineer
 
Why Java ?
Why Java ?Why Java ?
Why Java ?
 
Technology Agility
Technology AgilityTechnology Agility
Technology Agility
 
Quality Loopback
Quality LoopbackQuality Loopback
Quality Loopback
 
Achieving Technological Agility
Achieving Technological AgilityAchieving Technological Agility
Achieving Technological Agility
 
Technical Debt: Measured and Implied
Technical Debt: Measured and ImpliedTechnical Debt: Measured and Implied
Technical Debt: Measured and Implied
 
Distilling Agile for Effective Execution
Distilling Agile for Effective ExecutionDistilling Agile for Effective Execution
Distilling Agile for Effective Execution
 
Authorisation: Concepts and Implementation
Authorisation: Concepts and ImplementationAuthorisation: Concepts and Implementation
Authorisation: Concepts and Implementation
 
SOLID Java Code
SOLID Java CodeSOLID Java Code
SOLID Java Code
 
Coding for 11 Year Olds
Coding for 11 Year OldsCoding for 11 Year Olds
Coding for 11 Year Olds
 
High Speed Networks - Applications in Finance
High Speed Networks - Applications in FinanceHigh Speed Networks - Applications in Finance
High Speed Networks - Applications in Finance
 
Functional Programming in Java 8
Functional Programming in Java 8Functional Programming in Java 8
Functional Programming in Java 8
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and Runtime
 
Computing at Schools: A Guide to Parents
Computing at Schools: A Guide to ParentsComputing at Schools: A Guide to Parents
Computing at Schools: A Guide to Parents
 
Information technology
Information technologyInformation technology
Information technology
 
Code Club Talk 2014
Code Club Talk 2014Code Club Talk 2014
Code Club Talk 2014
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 

Maths with Programming

  • 2. Introduction Studied at College of Aeronautical Engineering, PAF Academy Risalpur. Graduated as an avionics systems engineer.
  • 4. Further Education MSc IT (Electronic Communications) 1995 PhD (Network Performance Monitoring) 1998 Research on monitoring parts of the Internet owned by British Telecom on how well they perform.
  • 6. My First Computer Casio PB-100F BASIC programming language 544 bytes of memory As opposed to 1 gigabytes of a simple netbook 1 gigabytes = 1073741824 bytes
  • 7. Programs and Data Data are numbers, alphabets, movies, pictures and sound. Inside a computer all of them are stored as numbers. Programs tell the computer how to treat those numbers, i.e., as alphabets, numbers, movies, pictures or sound.
  • 8. Programs List of instructions that execute on data. Data that programs process is stored in variables. Variables are memory locations which are given identifiable names.
  • 9. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div a b sum diff prod div Enter a: Memory
  • 10. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6a b sum diff prod div Enter a: 6 Enter b: Memory
  • 11. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 a b sum diff prod div Enter a: 6 Enter b: 2 Memory
  • 12. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 a b sum diff prod div Enter a: 6 Enter b: 2 Memory
  • 13. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 a b sum diff prod div Enter a: 6 Enter b: 2 Memory
  • 14. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum diff prod div Enter a: 6 Enter b: 2 Memory
  • 15. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div Enter a: 6 Enter b: 2 Memory
  • 16. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div Enter a: 6 Enter b: 2 sum = Memory
  • 17. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div Enter a: 6 Enter b: 2 sum = 8 Memory
  • 18. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div Enter b: 2 sum = 8 diff = Memory
  • 19. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div Enter b: 2 sum = 8 diff = 4 Memory
  • 20. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div sum = 8 diff = 4 prod = Memory
  • 21. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div sum = 8 diff = 4 prod = 12 Memory
  • 22. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div diff = 4 prod = 12 div = Memory
  • 23. My First Program Input "Enter a:", a Input "Enter b:", b sum = a + b diff = a - b prod = a * b div = a/b Print "sum = "; Print sum Print "diff = "; Print diff Print "prod = "; Print prod Print "div = "; Print div 6 2 8 4 12 a b sum 3 diff prod div diff = 4 prod = 12 div = 3 Memory
  • 24. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2
  • 25. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mean = Sum of all the numbers divided by the count = 37/12 = 3.083
  • 26. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mean = Sum of all the numbers divided by the count = 37/12 = 3.083 Median = Average of the numbers in the middle of the sorted list of values.
  • 27. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mean = Sum of all the numbers divided by the count = 37/12 = 3.083 Median = Average of the numbers in the middle of the sorted list of values. 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 7
  • 28. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mean = Sum of all the numbers divided by the count = 37/12 = 3.083 Median = Average of the numbers in the middle of the sorted list of values. 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 7 Median = 3
  • 29. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mode = The number that occurs the most.
  • 30. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mode = The number that occurs the most. Number Count 1 2 3 4 7
  • 31. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mode = The number that occurs the most. Number Count 1 1 2 3 3 5 4 2 7 1
  • 32. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mode = The number that occurs the most. Number Count 1 1 2 3 3 5 4 2 7 1
  • 33. Mean, Median, Mode 7, 3, 2, 3, 3, 4, 1, 4, 2, 3, 3, 2 Mode = The number that occurs the most. Mode = 3 Number Count 1 1 2 3 3 5 4 2 7 1
  • 34. A Python Program to Compute Meandata = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean)
  • 35. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) done Memory data input sum value mean
  • 36. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) done Memory data input sum value mean
  • 37. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean
  • 38. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end:
  • 39. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end: 3 3
  • 40. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end: 3 3
  • 41. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end: 3 3 3
  • 42. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end: 3 3 3 Enter a number of 'n' to end:
  • 43. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end: 3 1 3 Enter a number of 'n' to end: 1
  • 44. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean Enter a number of 'n' to end: 3 1 3 Enter a number of 'n' to end: 1
  • 45. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean 1 3 1 Enter a number of 'n' to end: 3 Enter a number of 'n' to end: 1
  • 46. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean 1 3 1 Enter a number of 'n' to end: Enter a number of 'n' to end: 3 Enter a number of 'n' to end: 1
  • 47. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean 2 3 1 Enter a number of 'n' to end: 2 Enter a number of 'n' to end: 3 Enter a number of 'n' to end: 1
  • 48. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean 2 3 1 Enter a number of 'n' to end: 2 Enter a number of 'n' to end: 3 Enter a number of 'n' to end: 1
  • 49. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean 2 3 1 2 Enter a number of 'n' to end: 2 Enter a number of 'n' to end: 3 Enter a number of 'n' to end: 1
  • 50. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean 2 3 1 2 Enter a number of 'n' to end: Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 51. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean n 3 1 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 52. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Falsedone Memory data input sum value mean n 3 1 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 53. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 54. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 55. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 0.0 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 56. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 0.0 3 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 57. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 3.0 3 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 58. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 3.0 1 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 59. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 4.0 1 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 60. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 4.0 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 61. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 6.0 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 62. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 6.0 2 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 63. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 6.0 2 2.0 Enter a number of 'n' to end: n Enter a number of 'n' to end: 1 Enter a number of 'n' to end: 2
  • 64. data = list() done = False while (not done): input = raw_input("Enter a number or 'n' to end: ") if (input != "n"): data.append(int(input)) else: done = True print(data) sum = 0.0 for value in data: sum = sum + value mean = sum/len(data) print(mean) Truedone Memory data input sum value mean n 3 1 2 6.0 2 2.0 Enter a number of 'n' to end: n Enter a number of 'n' to end: 2 2.0
  • 65. Key Lessons Computers are not intelligent or smart, humans are. Computer follow instructions listed as programs to perform tasks. Computers are much faster than humans in following instructions. All operations within a computer are either arithmetic or logical.
  • 66. The Future Data and information driven. Need for speed, the faster you can find, process and analyse data you need, the more successful you are. You will need to use computers efficiently to get that advantage. Most jobs in the next 30 years will require some level of programming.
  • 67. The Future “Sometime in the future, the trading floor of the London Stock Exchange will only be occupied by a computer, a man and a dog. The dog will guard the computer, the man will feed the dog and the computer will conduct the business”, Anonymous