Question: Create a variable intro _ e _ count that stores the number of times the letter ' e ' ( lower - case only )

Create a variable intro_e_count that stores the number of times the letter 'e'(lower-case only) appears in the my_intro variable. Find
a string method that will "count" the occurences. Print the variable after you create it.[3pt]
[0]
Part 2. Money
Define a function compound_interest() that takes three numbers as arguments: an initial bank balance (principle, in dollars), an annual
interest rate (as a decimal, so use .05 as 5%), and a number of years. The function should calculate the continuous compound interest and
return the resulting total balance after that many number of years. [9pt]
See here for an example of the formula and a calculator you can use to check your work.
Be sure and call your function with some testing numbers: $1000 at 6% for 5 years should lead to a balance of $1349.86.
You will need to import the math module for mathematical functions.
[0]
Define a function print_earnings () that takes three numbers as arguments: an initial principle, an annual interest rate (as a decimal, so
use .05 as 5%), and a number of years. This function should print out the earnings over this period in the following format:
Initial principle: $1000
Annual interest rate: %6.0
Interest earned in 5 years: $349.86
Total value after 5 years: $1349.86
You must use your previous compound_interest () function to calculate the amounts; don't write the same equation more than once! Note
that interest rate should be printed as a percentage, monetary values should have a leading $, and you should round monetary values to the
nearest penny. Don't worry about extra or missing trailing 0 s (in values like %6.0 or $101.5).[7pt]
[0]
Define a function value_of_change () that takes in named arguments representing amounts of different US coins (quarters, dimes,
nickels, and pennies)--each of the arguments should have a default value of 0. The function should return the total value in dollars of
those coins. For example, 5 quarters, 4 dimes, 3, nickels, and 2 pennies have a value of 1.82 dollars. [6pt]
Hint: add up all of the "cents" and then convert that into a number of dollars
Create a variable intro _ e _ count that stores

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 Programming Questions!