1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mr Goodwill [35]
3 years ago
8

Write a program that uses these bounds and bisection search (for more info check out the Wikipedia page on bisection search) to

find the smallest monthly payment to the cent (no more multiples of $10) such that we can pay off the debt within a year. Try it out with large inputs, and notice how fast it is (try the same large inputs in your solution to Problem 2 to compare!). Produce the same return value as you did in Problem 2.
Computers and Technology
1 answer:
Andrew [12]3 years ago
7 0

Answer:

I. i = 1

while i <= 12:

monthlyInterestRate = annualInterestRate/12.0

minimumMonthlyPayment = balance * monthlyPaymentRate

unpaidBalance = balance - minimumMonthlyPayment

updatedBalance = unpaidBalance + monthlyInterestRate * unpaidBalance

balance = updatedBalance

i += 1

print("The Remaining Balance is:" + " " + str(round(balance,2)))

II. monthlyInterestRate = annualInterestRate/12.0

fixedPayment = 10

def calculate(balance,monthlyInterestRate):

i = 1

while i <= 12:

unpaidBalance = balance - fixedPayment

balance = unpaidBalance + unpaidBalance * monthlyInterestRate

i += 1

return balance

while calculate(balance,monthlyInterestRate) > 0:

fixedPayment += 10

calculate(balance,monthlyInterestRate)

print("Lowest Payment is:" + " " + str(fixedPayment))

III.

initBalance = balance

monthlyInterestRate = annualInterestRate/12.0

low = balance/12.0

high = (balance * ((1.0 + monthlyInterestRate)**12))/12.0

epsilon = 0.01

minPay = (high + low)/2.0

month = 0

def calculate(month, balance, minPay, monthlyInterestRate):

while month <12:

unpaidBalance = balance - minPay

balance = unpaidBalance + (monthlyInterestRate * unpaidBalance)

month += 1

return balance

while abs(balance) >= epsilon:

balance = initBalance

month = 0

balance = calculate(month, balance, minPay, monthlyInterestRate)

if balance > 0:

low = minPay

else:

high = minPay

minPay = (high + low)/2.0

minPay = round(minPay,2)

print('Lowest Payment: ' + str(minPay))

Explanation:

I.Write a program to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month.

The following variables contain values as described below:

balance - the outstanding balance on the credit card

annualInterestRate - annual interest rate as a decimal

monthlyPaymentRate - minimum monthly payment rate as a decimal

For each month, calculate statements on the monthly payment and remaining balance. At the end of 12 months, print out the remaining balance. Be sure to print out no more than two decimal digits of accuracy

II.

Now write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance within 12 months. By a fixed monthly payment, we mean a single number which does not change each month, but instead is a constant amount that will be paid each month.

In this problem, we will not be dealing with a minimum monthly payment rate.

The following variables contain values as described below:

balance - the outstanding balance on the credit card

annualInterestRate - annual interest rate as a decimal

III. In short:

Monthly interest rate = (Annual interest rate) / 12.0

Monthly payment lower bound = Balance / 12

Monthly payment upper bound = (Balance x (1 + Monthly interest rate)12) / 12.0

You might be interested in
Review universal data models and discuss how these are being used more widely today. Does a data modeling project using a packag
adell [148]

Answer:

2. A data modelling project using a packaged data model REQUIRES A GREATER SKILL than a project not using a packaged data model.

Explanation:

1a. Review of universal models:

A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to the properties of real world entities. It has become the standard approach used towards designing databases.

A universal data model is a template data model that can be reused as a starting point or a building block to jump-start development of a data modelling project, industry specific model, logical data models.

1b. Discuss how these are being used more widely today.

*Universal data models helps professional reduce development time, improve consistency and standardization while achieving high quality models.

*Higher quality: just as architects consider blue prints before constructing a building, one should also consider data before building an app. A data model helps define the problem, enabling one to consider different approaches and choose best ones.

*By properly modelling and organization's data, the database designer can eliminate data redundancies (needless repetitions) which are a key source for inaccurate information and ineffective systems.

2. Greater and advanced skills are adequate and required when data modelling project is done using packaged data model while fewer skills are required when data modelling is done without packaged data model.

7 0
2 years ago
Read 2 more answers
What is a characteristic of a wan hub-and-spoke topology?
olga nikolaevna [1]

The characteristic of the WAN hub and spoke topology is that it is considered to be a branch site or composed of the branch site in which they are likely to be connected to a site that is central and that is through the point to point links.

8 0
2 years ago
These statements describe guidelines for the use of tables in presentations.
In-s [12.5K]

Answer:

(E)

Explanation:

I think it's E because it's the only answer that makes sense I guess!

4 0
3 years ago
Read 2 more answers
The % symbol is the remainder operator, also known as the ________ operator.
faust18 [17]

Answer:

It's also called the modulo operator.

6 0
2 years ago
Read 2 more answers
which of the following formatting tools would i use if i really wanted a word to stand out in my document​
sweet-ann [11.9K]
You should change the font of that specific word to another colour. And you can also make it bold and italic. Furthermore, you may even italicize it and make the font larger.

Hope it helps :)
6 0
3 years ago
Other questions:
  • An effectively distributed resume will get an interview
    12·2 answers
  • Victoria enjoys laughing with her friends as they walk around the track after school. Which best describes her hate rate during
    5·1 answer
  • ________ computers are specially designed computer chips that reside inside other devices, such as a car. Select one: A. Tablet
    11·2 answers
  • Swapping two numbers
    10·1 answer
  • A beginning driver may tend to oversteer. This means the driver what? Btw Cars are technology so that is why it is under Compute
    11·1 answer
  • The operating cost of driving include
    11·1 answer
  • Name the three basic storage device of a computer​
    6·2 answers
  • Resumen sobre Tailandia​
    10·1 answer
  • Join my FNAF fan club discord
    6·2 answers
  • In the following nested loop structure, which loop does the program EXIT first?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!