Numpy Python Mini projects: Expense Tracker
Expense tracker is one of the important applications in Numpy. It tracks the daily expenses, calculates the highest, lowest, average and total expenses. Let us implement the expense tracker in numpy. Implementation: First, built-in numpy library is included. It creates an array to read the input from the user. Print the array of elements. Next, total expenses are calculated by adding all elements in the array using sum() function. To find the ‘Average’ value by using mean() function in the numpy package. Other functions are included as follows. ‘max()’: it gives you the maximum value. ‘min()’: it finds the minimum value. It also checks the expense value is greater than 150 and calculates the sum and prints it. Code: import numpy as np1 # Let us create daily expenses s_expenses = np1.array(list(map(int, input("Enter the weekly expenses separated by space: ").split()))) print("Expenses of the week:", s_ex...