 # Process and additional criteria: In most cases, the purpose of a ...

## Question

In most cases, the purpose of a function is to accept one or more parameters and return a single value based on some operation on the parameters. The word “accept” means that the function will have parameters.
Use descriptive function names instead of function1, function2, etc. For example, a function that converts temperature readings in degrees Celsius to Fahrenheit may be named CelToFahren.

1. Function 1: A bank charges \$10 per month plus the following check fees for a commercial checking account: a. \$0.10 each for 1-19 checks
b. \$0.08 each for 20-39 checks
c. \$0.06 each for 40-59 checks
d. \$0.04 each for 60 or more checks

(Note that the same fee is charged for all checks. If the customer writes 21 checks, all 21 checks are billed at the \$0.08 rate.)
The bank also charges an additional \$15 if the balance of the account falls below \$400 (after applying the \$10 fee but before any check fees are applied).
Write a function named getFees() which takes two arguments: one representing the account balance, and the other representing the number of checks written during the past month. This function returns a value representing the total amount that will be charged in fees for this month. If the account balance is 0 or less, ask again so the user will enter a valid input. If the number of checks is 0 or less, ask again so the user will enter a valid input. Note that the function just returns the amount. We display the amount when we call the function.
For example, getFees(1000.0, 14) would return 11.4 (the basic \$10 fee plus 14 * 0.1 for the checks). getFees(250.75, 50) would return 28.0 (the basic \$10 fee, plus a \$15 penalty for falling below \$400.00, plus 50 * 0.06 for the checks).

Function 2: A function that accepts 3 integer parameters. Calculate and return the product of all integers between (inclusive) the first and second number with the step size identified by the third number. If the first number is more than the second number, return -999. For example, if the parameter values are 10, 1, 3, the function returns -999. If the parameter values are 1, 10, 3, the function returns 1*4*7*10 = 280. If the parameter values are -5, 7, 2, the product should be: -5*-3*-1*1*3*5*7 = -1575. This function does not display the product; it just returns the value of the calculated product or it returns the error code -999. Of course, we’ll display the value when we call the function.

Function 3: Write a function to print a message, if a given character (its parameter) is a vowel (a, e, i, o, and u) or not. You can assume that only lower case characters are entered by the user. The function accepts the character as its input and displays the corresponding message. For example, if the user enters x, the function displays x IS NOT a vowel. If the user enters 2, the function displays e IS a vowel. Note that the character is sent to the function and the function displays the corresponding message.
In a main function, call your functions and show their use. Make sure to provide input to test your code. Format all decimal number output to 2 digits after the decimal point.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

def getFees(amount, num_checks):

while amount <= 0:
amount_str = input("Please provide valid amount >0: ")
amount = int(amount_str)

while amount <= 0:
num_checks_str = input("Please provide valid number of checks >0: ")
num_checks = int(num_checks_str)

charge = 10
if (amount-10) < 400:
charge += 15

if num_checks < 20:
charge += num_checks*0.10

if 20 <= num_checks < 40:
charge += num_checks * 0.08

if 40 <= num_checks < 60:
charge += num_checks * 0.06...

By purchasing this solution you'll be able to access the following files:
Solution.py.

# 50% discount

Hours
Minutes
Seconds
\$18.00 \$9.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.