Class 3 To 8
Class 3 To 8
Questions:
1. Find the sales amount of repeat customers.
2. Find the total sales.
3. Find the list of redundant customers.
4. Find the Diwali sales which took place during Oct.
and Nov. and has a discount of 10% on MRP.
Python Basics
Data types:
Type Description Examples
int Integer value 100, 296, -98
float Floating point type can be represented in 8.5, 2.63, -7.47e^3
scientific notation, 1 e^3=1000
bool Boolean value True, False
+= x+=2 x=x+2
-= x-=2 x=x-2
*= x*=2 x=x*2
/= x/=2 x=x/2
%= x%=2 x=x%2
Lists and Tuples in Python
• There are two basic types of ordered sequences in
Python: list and tuples. Both stored ordered values but
have a crucial difference: list are mutable and tuples
are immutable.
• Lists are used when we need to modify , remove or
append values.
• Tuples are used when we need to only read the
values.
Python Packages (word file already
shared)
• NumPy
• Pandas
• SciPy
• Matplotlib
• Seaborn
• Bokeh
• Tensor Flow
• Pytorch
• Scikit Learn
Class Exercise
A new product sales scenario is characterized by a formula
called Gompertzian curve S=aebe^ct . Develop a spreadsheet
for calculating sales using this formula for t = 0 to 160 in
increments of 10 when a=15000, b= -8, and c= -0.05. Also
implement the above problem in python by reading input
from the excel file.
Class Exercise
• For the given data create a line chart, bar chart and a
scatter diagram using excel and python. Also draw the
charts by reading data from excel file.
Location Sales
Delhi 12547
Kolkata 14697
Mumbai 26000
Bengaluru 28941
Lucknow 3654
Udaipur 9687
Ranchi 10011
Class Exercise
A company forecasts its net revenue for the next three years
as INR 1728000, INR 2135800, INR 2939850. Find the net
present value (NPV) of these cash flows assuming a discount
rate of 4.2% using excel and python. Also, read the data
from the excel sheet and calculate NPV.
Class Exercise
A pharma manufacturer has projected net profits for a new drug that is
being released to the market over the next five years:
Year Net profit
1 -3000000
2 -1450000
3 500000
4 1250000
5 5300000
A fixed cost of Rs. 800000 has been incurred for R & D (in year 0). Use a
spreadsheet to find the NPV of these cash flows for a discount rate of
3%.
Class Exercise
The data of an organization which has the sales to the following
industry are given in the table below. Find the total revenue from each
industry and the grand total.
INDUSTRY SALES UNITS SALES PRICE (₹)
A 3467 73.5
B 4156 430.84
C 1537 159.6
B 664 38.25
A 995 48.63
D 2478 189.67
C 4058 28.41
A 7051 57.08
D 2400 222.22