You are on page 1of 2

BDS Programming for Analytics – HW 4

10 Marks

Q1)A large consulting firm wants to build simple software for computing salary
increments. Develop a Python OOPS based program / code to create an Employee class
with Appropriate methods to compute salary increment.

Hint:
The method to update salary will take as input the rating level
Notes:
Keep check for ratings out of allowed levels
(5 Marks)

Part Marks will be provided if you do this with ordinary if else and without using
Classes

The rule is as follows


 If rating = 0 – No Increment
 If rating = 1 – 5% increment
 If rating = 2 – 10 % increment
 If rating = 3 – 15 % increment

Define an Employee Class in python which should be created with EmpId, Empname ,
base salary

The class should have methods as below


 Check Salary – This will return the value of the salary as is
 Update_Salary – This will be passed the rating and based on the rating it will
update the salary with the increment

Test your code as follows


 Test your Class by creating an Employee with Salary 1000
 Call Check Salary it should say “Emp -xxx” has salary 1000
 Then perform an Update salary with rating 2
 Call Check Salary again on this Employee – it should now show salary as 1100

Q2) For this please download the dataset as mentioned below

Data Set download link

https://www.kaggle.com/datasets/annakhew/sample-country-sales-dataset

Write python code to answer the below questions ( 5 Marks)


 Q1a) Which Country has the Highest Total Revenue overall for Baby Food?
 Q1b) What are the top 5 Most profitable Items overall ?
 Q1c) Which Region has the Highest overall sales by Units for Cosmetics?
 Q1d) Which European Country has the highest Overall cereal sales by Total
Revenue?
 Q1e) Who are the Top 5 Countries with Highest ONLINE sales of office supplies

You might also like