Programming Assignment - 1
Dimitri Didmanidze
Due: October 11, 2023
Abstract
In this programming assignment, we will use the concepts of variable declaration, arith-
metic operations, container data types, built in functions and work on strings.
1 Summary
This assignment consists of 1 programming task. Making a Personal Expense Tracker. We will
use the concepts learned in class and follow the PEP8 style guidelines.
2 Assignment
2.1 Prompt the user
1. Ask the user for their name (String input).
2. Ask the user for the number of expense categories they want to track (e.g., ”food”, ”trans-
port”, ”entertainment”). This should be an Integer input.
3. For each category, prompt the user to enter the category name. Store these.
2.2 Store data
1. For each category, ask the user to enter the number of transactions they’ve had in the past
month. This should be an Integer input.
2. For each transaction, prompt the user to enter the expense amount (Float input) and store
these.
2.3 Data analytics
1. Calculate the total amount spent in each category, calculate the mean and median for each
category.
2. Convert and store each total into a String with 2 decimal places.
3. Calculate the user’s overall expenditure.
4. Identify the category where the user spent the most.
2.4 Data display
1. Display the user’s name and a breakdown of their expenses.
2. For each category, show the number of transactions and the total amount spent.
3. Display the mean and median for each category.
4. Display the user’s overall expenditure and the category where they spent the most.
1
3 Evaluation Criteria
The assignment will be graded according to the following criteria:
1. Functionality: Does the program run without errors and produce the expected outputs?
2. Data Structures: Proper usage of data structures, strings, integers, and floats.
3. Code Clarity: Following PEP 8 guidelines, using descriptive variable names, and proper
structuring of code.
4. I/O Handling: Properly prompting the user for inputs and displaying results.