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]
4 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]4 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
Select the correct answers
Mashutka [201]

Answer:

Use a mixture of External and Internal Links....

Explanation:

8 0
3 years ago
What is the result of successfully applying a Machine Learning (ML)<br> algorithm to analyze data?
DIA [1.3K]

Answer:

Machine Learning algorithms can predict patterns based on previous experiences. These algorithms find predictable, repeatable patterns that can be applied to eCommerce, Data Management, and new technologies such as driverless cars..

5 0
3 years ago
(tco 2) c++ comments are represented by which characters?
Margarita [4]
(TCO 2) In C++ terminology, (Points : 4) a ... a class object is the same as a class instance. a class object is the same as a class member. a class object is the same as a class access specifier.
4 0
3 years ago
Match each definition with the term it describes. A(n) ______ provides identification and addressing information for computers a
earnstyle [38]

Answer:

IP address, LAN, WAN

Explanation:

6 0
3 years ago
Alex can't play his newest video game on his desktop computer because his video card is too slow. Alex needs to install a video
Naddik [55]

In order to play his graphics intensive games, Alex needs to install a video card that has a faster: microprocessor and graphics processing unit (GPU).

<h3>What is a video card?</h3>

A video card can be defined as a printed circuit board or graphics card that is designed and developed to generate a feed of output and video signals which are sent to the display device of a computer such as a monitor.

In this scenario, Alex needs to install a video card that has a faster: microprocessor and graphics processing unit (GPU), so as to enable him to play his graphics intensive games.

Read more on video card here: brainly.com/question/14380167

7 0
2 years ago
Other questions:
  • If an ips identifies an attack, it can ________.
    15·1 answer
  • Answer the following
    11·1 answer
  • Write a program that simulates rolling one die using the following steps: 1. Prompt the user for the number of sides on the die.
    13·1 answer
  • Which scenario describes a student citing an online source in his or her work?
    8·2 answers
  • This is due in like an hour but I'm confused so please do lend assistance
    6·1 answer
  • Using complete sentences post a detailed response to the following.
    12·2 answers
  • When running the following code:
    10·1 answer
  • How to get the whole number of a fraction in python
    6·1 answer
  • Canada’s energy plan, named __________, makes three governmental agencies accountable for safeguarding Canada’s environment.
    5·1 answer
  • leon started a project to design and create a new video game for the animation studio where he develops graphics and animations
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!