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
Black_prince [1.1K]
3 years ago
8

Write an algorithm that gets as input your current credit card balance, the total dollar amount of new purchases, and the total

dollar amount of all payments. The algorithm computes the new balance, which this time includes an 8% interest charge on any unpaid balance below $100 , 12% interest on any unpaid balance between $100 and $500, inclusive, and 16% on any unpaid balance about $500.
Computers and Technology
1 answer:
Sindrei [870]3 years ago
6 0

Answer:

balance = float(input("Enter the current credit card balance: "))

purchases = float(input("Enter the amount of new purchases: "))

payments = float(input("Enter the amount of all payments: "))

unpaid = purchases - payments

if unpaid >= 0 and unpaid < 100:

   balance = balance + payments - purchases - (unpaid * 0.08)

elif unpaid >= 100 and unpaid <= 500:

   balance = balance + payments - purchases - (unpaid * 0.12)

else:

   balance = balance + payments - purchases - (unpaid * 0.16)

   

print("The balance is " + str(balance))

Explanation:

*The code is in Python.

Ask the user to enter the balance, amount of purchases, and amount of payments

Calculate the unpaid balance, subtract payments from purchases

Check the unpaid balance. If it is smaller than 100, calculate the new balance, add payments, subtract purchases and the 8% interest of unpaid balance. If it is between 100 and 500, calculate the new balance, add payments, subtract purchases and the 12% interest of unpaid balance. If it is greater than 500, calculate the new balance, add payments, subtract purchases and the 16% interest of unpaid balance

Print the balance

You might be interested in
What type of maintenance can prevent the computer from breaking?
qwelly [4]
<span>The answer is, "Load anti-virus software".
</span>Anti-virus softwares are used to prevent computer from virus, as it name shows that are anti-virus means they prevent from virus. Anti virus softwares are also known as anti-malware software. These software work in such a way that they <span>prevent, detect and then remove viruses or </span><span>malicious software.</span>
3 0
3 years ago
Read 2 more answers
The angles of a quadrilateral are in the ratio 1:2:3:4 what is the largest angle​
zheka24 [161]

Answer:

144°

Explanation:

The sum of the measures of interior angles of a quadrilateral is 360°

The ratio of angle measures is 1:2:3:4

Total ratio = 1+2+3+4=10

The angles will be :

1/10 * 360°= 36°

2/10*360°=72°

3/10*360°=108°

4/10*360°=144°

The largest angle is 144°

7 0
3 years ago
Are brake and break pronounced the same way?​
erastova [34]

Answer:

one is correct and yes

Explanation:

4 0
2 years ago
Pat is listing the parts of a computer. Which is the best option to use when formatting the list?
Zina [86]
If you mean a web page ten the bet option would be elements, where gives you an unordered list and give you an order list
5 0
3 years ago
3X5
iren2701 [21]

Answer:

Explanation:

No idea bro

7 0
2 years ago
Other questions:
  • Which element of a business document provides additional information but is not a part of the body of the text?
    13·2 answers
  • 3. You are a network administrator responsible for all network platforms and services. The Teta Company currently has only one b
    13·2 answers
  • I just started game development using unity, I’m trying to control my sphere moving on a flat surface using the W,A,S,D keys, if
    5·1 answer
  • A .jpg file is an example of which of the following file types
    15·2 answers
  • Assuming you have a TCF free student checking account, how many maximum overdraft fees can you incur in one day?
    12·1 answer
  • I need help plzzzzzzzz
    10·2 answers
  • Consider a system that uses a 32-bit unique salt where users have a 4-digit number as a password (e.g. 6813). Eve wants to crack
    8·2 answers
  • Which statement pertaining to system reliability is FALSE? Select one: A. Having the latest version of software products can mak
    15·1 answer
  • What are the network topologies? Advantages and disadvantages.
    9·1 answer
  • I am trying to sum up a set of data based on 2 criteria (needs to have "green" in column E, and "January 2020" in collum A). Col
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!