4. Compound Interest Formula Please write Python code to implement the following compound interest formula and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4. Compound Interest Formula Please write Python code to implement the following compound interest formula and solve the problem below. A = P(1 + -)nt n A P = final amount initial principal balance r = interest rate n = number of times interest applied per time period t = number of time periods elapsed 4a) Bank A offers a 5% interest compounded semi-annually (n=2). A customer deposits HKD$1600 on 1st January of a year. At the end of the year, the amount he would have gained by way of interest is: Implement the compound interest formula with the following variables: P = 1680; r = 5/199; n = 2; t=1 Expected output: The interest gained is $81.0 Data Types int integer integer float floating subtraction point multiplication True or False to the power of division // floor division 18 mod bool str [...] list string Math Functions / Conversion abs () input () print () round () type () int() Arithmetic Operators List /String Operations list [...] list[:] Float () str() absolute value 1+ ask user for input display the input value(s) in not in list.sort () list.append() list.pop() remove and return an item at a specific index list.count() count the occurrence of the input item list.index() find the index of the input item len () max() min() sum () round off the input value range (...) return data type of input range (...) convert input to integer convert input to float convert input to string locate item(s) in a list combine two lists/ strings check existence in a list / string check if not exists in a list / string add a new element in the list sort the input list return the number of elements in input list find the biggest element in the input list find the smallest element in the input list find the sum of all elements of the input list create a list of integer Relational Operations is equal? k is less than? K= is less than or equal to? != is not equal? is greater than? is greater than or equal to? Boolean Operators and are both operands True? is/are either (or both) of the operands True? not is the operand False? or Conditional Statement if <condition>: <true-stmt-for-A> elif <condition>: <true-stmt-for-> else : <false-stmt> Loop (for) for svar> in <iterable: <code-block> Loop (while hile <condition>: <code-block> break terminate a loop 4. Compound Interest Formula Please write Python code to implement the following compound interest formula and solve the problem below. A = P(1 + -)nt n A P = final amount initial principal balance r = interest rate n = number of times interest applied per time period t = number of time periods elapsed 4a) Bank A offers a 5% interest compounded semi-annually (n=2). A customer deposits HKD$1600 on 1st January of a year. At the end of the year, the amount he would have gained by way of interest is: Implement the compound interest formula with the following variables: P = 1680; r = 5/199; n = 2; t=1 Expected output: The interest gained is $81.0 Data Types int integer integer float floating subtraction point multiplication True or False to the power of division // floor division 18 mod bool str [...] list string Math Functions / Conversion abs () input () print () round () type () int() Arithmetic Operators List /String Operations list [...] list[:] Float () str() absolute value 1+ ask user for input display the input value(s) in not in list.sort () list.append() list.pop() remove and return an item at a specific index list.count() count the occurrence of the input item list.index() find the index of the input item len () max() min() sum () round off the input value range (...) return data type of input range (...) convert input to integer convert input to float convert input to string locate item(s) in a list combine two lists/ strings check existence in a list / string check if not exists in a list / string add a new element in the list sort the input list return the number of elements in input list find the biggest element in the input list find the smallest element in the input list find the sum of all elements of the input list create a list of integer Relational Operations is equal? k is less than? K= is less than or equal to? != is not equal? is greater than? is greater than or equal to? Boolean Operators and are both operands True? is/are either (or both) of the operands True? not is the operand False? or Conditional Statement if <condition>: <true-stmt-for-A> elif <condition>: <true-stmt-for-> else : <false-stmt> Loop (for) for svar> in <iterable: <code-block> Loop (while hile <condition>: <code-block> break terminate a loop
Expert Answer:
Answer rating: 100% (QA)
SOLUTION Heres the Python code that implements the compoun... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these banking questions
-
The 1D array StudentName[] contains the names of students in a class. The 2D array StudentMark[] contains the mark for each subject, for each student. The position of each student's data in the two...
-
13. Find compound amount and compound interest using the compound interest formula. Time Principal $3,425 Period (years) 11 Nominal Rate (%) 6.6 Interest Compounded monthly Compound Amount Compound...
-
Write Verilog code to implement the following state table. Use two always blocks. State changes should occur on the falling edge of the clock. Implement the Z 1 and Z 2 outputs using concurrent...
-
QUESTION 7 We discussed the selection sort sorting algorithm. What is the worst case time complexity of selection sort when sorting a list of n elements? o(lg n) O(n) O(n lg n) O(n) O(log n) O(1)
-
Use the numerical derivative feature of a graphing calculator to approximate the given second derivatives. 1. f"(3) for f(x) = x3 - 27/x 2. f"(-1) for f(x) = x2/4 - 4/x2 3. f"(21) for f(x) = x2 + 4
-
Complete thefollowing: Account Category Normal Balance A. Accounts Payable B. Taxable Fees Earned C. Accounts Receivable D. M. Blanc, Capital E. M. Blanc, Withdrawals F. Prepaid Advertising G. Rent...
-
Describe the nature and scope of tests of balances.
-
Several years after reengineering its production process, Biltmore Corporation hired a new controller, Rachael Johnson. She developed an ABC system very similar to the one used by Biltmores chief...
-
Calculate the magnitude (signs don't matter) of the centripetal acceleration in an electron if it is moving around a nucleus with a speed of 2.18 x 10 m/s. The diameter of the electron's orbit is...
-
5 I . 1 2 im 4 5 5 7 B SCENARIO & REQUIREMENTS SCENARIO: You have invented the first maintenance-free jet wax called "Jetwax 100." Jetwax 100 can last up to 1 year on any plane surface. In order to...
-
The adjusted trial balance for Blossom Company, owned by D. Blossom, are as follows: BLOSSOM COMPANY Adjusted Trial Balance December 31, 2021 Adjusted Trial Balance Account No. Account Titles Dr. Cr....
-
Identify at least ten ethical dos that should guide the professional conduct of paralegals.
-
Define elasticity, rigidity, hardness, fatigue, ductility, brittleness.
-
Identify the most commonly included provisions of a premarital agreement.
-
Enlist physical properties of engineering materials.
-
Define jurisdiction in both of its basic meanings.
-
Find the Fourier coefficients in exponential form for the function below. (a) f(t)= t, [-1,1] (b) x(t) = cos(2nt) + cos(3t)
-
we have to compute the letter grades for a course. The data is a collection of student records stored in a file. Each record consists of a name(up to 20 characters), ID (8 characters), the scores of...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-6. On December 12, Irene purchased the building where her store is located. She paid...
-
Ray and Maria Gomez have been married 3 years. They live at 1610 Quince Ave., McAllen, TX 78701. Ray works for Palm Oil Corporation and Maria works for the City of McAllen. Maria's Social Security...
-
The chapter provides sample goals for an initial sales call on a prospect. (a) What other goals can you come up with that might be appropriate for an initial sales call? (b) Develop three or four...
-
Pick any three of the sources of prospects discussed in the chapter and pick a product or service you like. Develop several ideas for how you would use each source to locate leads for the product or...
-
Why do you think a salesperson might experience call reluctance? How can it be overcome?
Study smarter with the SolutionInn App