Question: In this assignment, you will write multiple functions in a single python file named banking.py. Each of the functions will compute operations that a bank

In this assignment, you will write multiple functions in a single python file named banking.py. Each of the functions will compute operations that a bank might need/want to know. In this assignment, you are not implementing a complete bank-account management system. Instead, you are going to write individual functions, that complete very specific bank-related tasks. You should call the functions to test that they are working correctly. However, when you submit banking.py, do not leave any calls to the functions in there. The contents of the file should be only the function definitions. No need for a main() function. You must use loops (while or for) to implement each of these functions except for min_max_account. You should not use the sum(), min() or max() built-in python functions. You may use sort().

Write a function named sum_of_all_accounts. This function will have one parameter, named whatever you like, which you can assume will be a list of integers representing bank account values in US dollars. This function will compute the sum of all of the accounts. The sum will be returned by the function. Write a function named min_max_account. This function will take one parameter, named whatever you choose, which you can assume is a list of integers representing bank account values in US dollars. This function will determine the smallest (minimum) and largest (maximum) bank account. Once the two numbers are determined, it will print them both out like so:

The min bank account is: X The max bank account is: Y 

But, instead of just printing X and Y, print the actual numeric values of the accounts.

Write a function named get_max_customer. This function will have two parameters: The first is a list of integers representing bank account values in US dollars. The second is a list will be the same length as acct_values, and has the owner name that correspond with each value in the other list. For example, the first argument might be the list [1000, 1500, 1200, 3000] and the second argument could be: ['Jim', 'Alex', 'Jane', 'Anne']. This means that Jim has $1000 in his account, Alex has $1500 in his, Jane has $1200 in hers, and Anne has 3000 in hers.

This function will return the name of the bank customer with the highest valued account. Write a function named report_all_acct_info. This function will have two parameters (the same parameters as get_max_customer): This function will print out a report to the python console with the name and corresponding account value for each account passed to the function. For example, if the first parameter is [100, 200, 450] and the second is [ 'John', 'Bill', 'Samuel' ], then the function will print the following when called:

All accounts John's bank account has $100 Bill's bank account has $200 Samuel's bank account has $450 

Write a function named report_acct_info. This function will take three total parameters. The first two will be the same as the previous two problems. The third one will be a single integer named minimum. This function will print out a similar report to the last problem. However, it will only print out accounts that have a dollar amount greater than than the minimum integer. For example, if the first parameter is [100, 700, 900, 200, 450], the second is ['Jane', 'Ally', 'Bill', 'Will', 'Samuel'], and the third is 400, then the function will print the following when called:

All accounts valued greater than 400 Ally's bank account has $700 Bill's bank account has $900 Samuel's bank account has $450 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!