Professional Documents
Culture Documents
Lec 1 2
Lec 1 2
Department of Mathematics
Institute of Business Administration.
Yousuf Tufail ¯ Yousuf Tufail
ytufail@iba.edu.pk
Lecture 1 & 2
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 1/8
Creating Variable
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Solution
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Solution
Req profit after 8 year= 8*Profit per year
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Solution
Req profit after 8 year= 8*Profit per year
print(Req profit after 8 year)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Creating Variable
Profit per year=50000
Solution
Req profit after 8 year= 8*Profit per year
print(Req profit after 8 year)
400000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 2/8
Example (2)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 3/8
Example (2)
What would be the profit after 12 years?
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 3/8
Example (2)
What would be the profit after 12 years?
Solution
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 3/8
Example (2)
What would be the profit after 12 years?
Solution
600000
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 3/8
Calculation of Body mass index(BMI)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
height=1.79
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
height=1.79
weight=68.7
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
height=1.79
weight=68.7
BMI=
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
height=1.79
weight=68.7
BMI= weight/height**(2)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
height=1.79
weight=68.7
BMI= weight/height**(2)
print(BMI)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (3)
Calculate the body mass index for the following observation.
height = 1.79, weight = 68.7
Solution
height=1.79
weight=68.7
BMI= weight/height**(2)
print(BMI)
21.4413
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 4/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (4)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 5/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (4)
Calculate the body mass index for the following observation.
height = 1.79, weight = 74.2
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 5/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (4)
Calculate the body mass index for the following observation.
height = 1.79, weight = 74.2
Solution
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 5/8
Calculation of Body mass index(BMI)
weight
BMI = height 2
Example (4)
Calculate the body mass index for the following observation.
height = 1.79, weight = 74.2
Solution
23.1578
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 5/8
Types of variable
Example (5)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
a=2
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
a=2
b=2.34
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
a=2
b=2.34
c=‘I am string’
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Example (5)
What are the types of the following variable.
a=2, b=2.34, c=‘I am string’, d=True
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 6/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
float
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
float
print(type(c))
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
float
print(type(c))
string
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
float
print(type(c))
string
print(type(d))
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
float
print(type(c))
string
print(type(d))
bool
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Types of variable
Solution
a=2
b=2.34
c=‘I am string’ (It will be green in color)
d=True (It will be blue in color)
print(type(a))
int
print(type(b))
float
print(type(c))
string
print(type(d))
bool
Note: Strings are always written in ‘ ‘ or ” ”
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 7/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8
Lists
Dr. Muhammad Yousuf Tufail (IBA.) Essential Software Lecture 1 & 2 8/8