Concept explainers
You have just purchased a stereo system that cost $1,000 on the following credit plan: no down payment, an interest rate of 18% per year (and hence 1.5% per month), and monthly payments of $50. The monthly payment of $50 is used to pay the interest and whatever is left is used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $1,000 in interest. That is $15 in interest. So, the remaining $35 is deducted from your debt, which leaves you with a debt of $965.00. The next month you pay interest of 1.5% of $965.00, which is $14.48. Hence, you can deduct $35.52 (which is $50 – $14.48) from the amount you owe. Write a
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Computer Science: An Overview (12th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Starting Out with C++: Early Objects
Absolute Java (6th Edition)
Modern Database Management (12th Edition)
- Scenario As you surely know, due to some astronomical reasons, years may be leap or common. The former are 366 days long, while the latter are 365 days long. Since the introduction of the Gregorian calendar (in 1582), the following rule is used to determine the kind of year: if the year number isn't divisible by four, it's a common year, otherwise, if the year number isn't divisible by 100, it's a leap year. otherwise, if the year number isn't divisible by 400, it's a common year. otherwise, it's a leap year. none of the above year int(input("enter the year")) if (year%4 1-0) and (year%400 -0) or (year % 1000): print (year is common year") else: print(year, is leap year") year= int(input ("enter the year")) if (years !-0) or (year480 1-0) and (year % 1001-0): print(year is common year") else: print(year, "is leap year") D year= int(input("enter the year"))arrow_forwardA basic safe type of investment is an annuity: one makes monthly deposits of size P for n months at a fixed annual interest rate r, and at maturity collects the amount 12P n r ((₁ + 2)² − ¹) 12 r (This is not the definition of annuity that you may be familiar with, but the calculation is part of any accumulation of funds over time.) Say you want to create an annuity for a term of 300 months and final value of 1,000,000 dollars. Using nlsolve, make a table of the interest rate you will need to get for each of the different contribution values P 500 + 50k, k = 0, ..., 10. - Hint: if you write a function for the value of annuity, or the difference between this value and one million dollars with several arguments (P, r, n), you can then create a new function of just the one variabler for each value of P in a loop. The table and pretty tables approach used in homework 2 will be helpful here.arrow_forward1. You need to take a trip by car to another town that you have never visited before. Therefore, you are studying a map to determine the shortest route to your destination. Depending on which route you choose, there are five other towns (call them A, B, C, D, E) that you might pass through on the way. The map shows the mileage along each road that directly connects two towns without any intervening towns. These numbers are summarized in the following table, where a dash indicates that there is no road directly connecting these two towns without going through any other towns. Miles between Adjacent Towns Town A B C D E Destination Origin 40 60 50 A 10 65 B 10 20 55 40 20 50 65 55 10 60 E 40 50 10 80 Formulate this problem as a shortest-route problem and find the shortest path.arrow_forward
- JAVA Based Prgmarrow_forwardA flight of stairs has 10 steps numbered 1 to 10 as shown in the figure below. i. How many ways could you climb up the set of stairs, assuming that you can skip any number of stairs with each step, but you must end on step 10 and you can only go up, never down and never remaining on the same step. ii. How many ways could you climb up the set of stairs, assuming you take exactly 4 steps. Again, your staircase climb ends on step 10. JAlthough there are different ways in which you could solve this problem, model the problem as a balls and bins problem for full credit.arrow_forwardAt QT Sugar factory the amounts which go into bag of sugar are supposed to be normally distributed with mean 36 kg and standard deviation 0.1 kg. Once every 30 minutes a bag is selected from the production line, and its contents are noted precisely. If the amount of the bag goes below 35.8 kg or above 36.2 kg, then the bag will be declared out of control. a) If the process is in control, meaning u = 36 kg and o= 0.1 kg, find the probability that the bag will be declared out of control. b) In the situation of (a), find the probability that the number of bag found out of control in an eight-hour day (16 inspections) will be zero. c) In the situation of (a), find the probability that the number of bag found out control in an eight- hour day (16 inspections) will be exactly one. d) If the process shifts so that u =37 kg and o=0.4 kg find the probability that a bag will be declared out of control.arrow_forward
- You have just started a sales job in adepartment store. Your pay consists of a base salary and a commission. The base salaryis $5,000. The scheme shown below is used to determine the commission rate. Note that this is a graduated rate. The rate for the first $5,000 is at 6%, the next$5000 is at 8%, and the rest is at 10%. If your sales amounts to $25,000, the commissionis 5,000 * 6% + 5,000 * 8% + 15,000 * 10% = 2,200. Your goal is toearn $30,000 a year. Write a program to find the minimum sales you have to generatein order to make $30,000.arrow_forwardUsing C Languagearrow_forwardSuppose you wanted to harness to power of wind to generate electricity. One question you might want to ask is: what is the amount of power my wind turbine can produce? To answer this question, you will need at least the following information: The average wind speed (in m/s) The operating efficiency of your wind turbine (in %) The radius of the blades on your wind turbine (in meters) To compute the maximum power output for your wind turbine, you would need the following math formulas: A= πr2, which represents the cross-sectional area of a circle (π = 3.14159265). Pmax = 0.5ρAv3, which calculates the maximum available power given the wind speed in m/s (ν), cross-sectional area of the blades in m2 (A), and the density of the air (ρ = 1.2 kg/m3). Once you have the maximum available power, computing the actual amount of power (not the maximum) produced by the wind turbine is a matter of determining the amount of power based on the operating efficiency. Exercise #1: Create a Java class…arrow_forward
- Loan negotiation is usually not a straightforward task. A type of loan is the discount installment loan. This type of loan has the following characteristics. Supposing a loan has face value of GHC 1000, interest is 13% and the duration is 24 months. The interest is compounded by multiplying the face value by 0.13 to produce GHC 130. The figure (130) is then multiplied by the loan period of 2 years to give GHC 260 as the total interest owed. This amount is immediately deducted from the face value leaving the customer with only GHC 740. Repayment is then made in monthly equal installments based on the face value. This means that the monthly payment will be GHC 1000 divided by 24 which is approximately 41.67. This method of calculating the monthly repayment is not too bad if the consumer needs only GHC 760 but the calculation is a bit complicated if the consumer needs GHC 1000. a. Write a program that will take 3 inputs 1. The amount the consumer needs 2. The interest rate 3. The duration…arrow_forwardSuppose you have a certain amount of money in a savings account that earns compoundmonthly interest, and you want to calculate the amount that you will have after a specificnumber of months. The formula is as follows: F=P×(1+i)tF=P×(1+i)t The terms in the formula are: • F is the future value of the account after the specified time period.• P is the present value of the account.• i is the monthly interest rate.• t is the number of months.• F is the future value of the account after the specified time period.• P is the present value of the account.• i is the monthly interest rate.• t is the number of months. $$ Write a program that prompts the user to enter the account’s present value, monthly interest rate, and the number of months that the money will be left in the account. The program should pass these values to a function that returns the future value of the account, after the specified number of months. The program should display the account’s future value.arrow_forwardASAParrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr