Assignment 3 - Python
Assignment 3 - Python
Instructions:
➢ This assignment is an individual submission.
➢ Total Marks of 100 Marks with duration of 3 weeks.
➢ All script submissions should be submitted via moodle
➢ Inputs/output should fit the criteria mentioned in the respective question.
➢ All other conditions are open to your interpretations.
➢ Evaluation will be conducted based on a fixed grading rubric (syntax, logic,
input and output) and the marks are divided as per prescribed weightage in
respective questions.
➢ The assignment must be made in Python only.
➢ You are free to use any libraries that you deem fit, except when mentioned in
the particular question.
➢ For queries, reach out to TAs via Moodle
Submission Criteria:
➢ Please create one ZIP file as <rollnumber>_A3.ZIP
➢ Include all your scripts inside the ZIP as follows <rollnumber>_A3_Q1.py,
<rollnumber>_A3_Q2.py, <rollnumber>_A3_Q3.py and README.md (to
provide any instructions to evaluator or your notes)
➢ For Example:
2022201079_A3.zip
|_____2022201079_A3
|_____2022201079_A3_Q1.py
|_____2022201079_A3_Q2.py
|_____2022201079_A3_Q3.py
|_____README.md
Question 1: (30 Marks)
Expense Tracker
You have to design a Menu based Expense Tracker. The menu will be of the
following format:
Menu:
● Add participant(s)
● Add expense
● Show all participants
● Show expenses
● Exit/Export.
Explanation
● Add participant(s): Enter 1 or more than 1 unique names who will
participate in the transactions.
● Add expense: On entering this option you, have to take 3 further inputs:
○ Paid by: <Name of the person who paid the money>
○ Amount: <The amount paid by the person>
○ Distributed amongst: <All the participants that are involved in this
payment.>
■ You can take the number of participants first and then take the
name of each person or you can take one string and tokenize it.
It’s your choice.
■ The split is always equal among the mentioned names.
● Show Participants: Just display all participants that are currently there.
● Show expenses: A table should be displayed showing each person’s
expenses. The table must be divided into 2 columns for each participant.
Participant’s Name
○ Note that the table must contain each participant. The above table is a
subset of the table showing only one participant.
● Exit/Export: On exiting, you have to write back the data in a .csv file. The
name of the file should be “expenses.csv”. The data arrangement in the csv
file is up to you.
Note: Write the program covering all the logical edge cases that you can identify.
Rest all details are up to you and should be mentioned in the Readme.md.
In order to maintain the cricket directory, make a menu driven program and
implement the following functionalities:
2.
This part is an extension of the data created in Q-2. You have to create a
comparison histogram for all the players. For example:
For this particular example, there were only 3 players, where Singhal and Kakashi
are all rounders, but Anurag is a bowler only.
Note:
● You have to create histograms based on the player’s role.
● Just show the relevant strike rate and no other data.