2023-09-22 10:02:55 -04:00

1.0 KiB

Loan or No Loan?

Here is some people's last month bank statements. Query the database to answer the questions. Write methods to return all of the information to you. Don't do this manually, use the Python sqlite3 library..

  • How many people are there in the database?
  • What is each persons salary (return their name and salary)?
  • What is each persons net income?
  • How about their highest expense?
  • What percent of their salary did they spend?
  • What was the average price of their expenses (don't include salary)?
  • How many expenses did each person have?
  • How many things did each person buy in the first week of the month? How much money did they spend?
  • How about in the last week?
  • Print everything bought between $40 and $60.
  • Using the mortgage calculator you built before (you may need to make some adjustments), how large of a house could each person afford on a 15 year mortgage at 4%, if they plan on saving $200 a month (assuming they keep their jobs and spend the same amount).
  • Write the database to a csv.