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
Ian’s photography teacher asks him to take some photos of a few different species over the weekend. Which group of photos would
alina1380 [7]
I think it’s b or d..............
5 0
3 years ago
Suppose you wanted to run a web server or ftp server from your home. what type of ip address would you want?​
Greeley [361]
You would need to have a static ip address.
3 0
3 years ago
Lesser-known ideas and interpretations of common knowledge need to be documented. true or false.
Tresset [83]
False. As it is common knowledge, it is unnecessary for it to be documented.
7 0
3 years ago
The term unauthorized access is a synonym for hacking. <br><br> a. True <br><br> b. False
natita [175]
The answer is True. Hacking is synonymous with unauthorized access most especially when it is intentional. Unauthorized access is defined as illegally gaining access to a file on a computer. It is the same as accessing a network or system without the permission of the owner.
8 0
3 years ago
Free poi nts here you go
tatuchka [14]

Explanation:

<em>Thank</em><em> </em><em>you</em><em> </em>

<em>Bye</em><em> </em><em>and</em><em> </em><em>have</em><em> </em><em>a</em><em> </em><em>great</em><em> </em><em>day</em><em> </em>

4 0
3 years ago
Other questions:
  • 7.
    6·1 answer
  • 3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
    13·2 answers
  • The chemical symbol H represents which of the following elements?
    9·2 answers
  • How do you run a function in python?
    5·1 answer
  • Which factor did not contribute to the increase of leisure travel in the early twentieth century in the United States?
    7·2 answers
  • Whereas lines of competition are clearly defined in the more established industries, in the Internet industry they are blurred a
    9·1 answer
  • _________function tells the cin object to skip one or more characters in the keyboard buffer.
    11·1 answer
  • Convert the following hexadecimal numbers to decimal numbers. (Show your work) a. 0xE3 b. 0x4A c. 0xF9
    10·1 answer
  • The dns server translates the URL into the IP address 8.8.8.8. What is the next step in the process?
    11·1 answer
  • Sarah is starting her first job at the local ice cream shop. what can Sarah do to make a good impression on her first day of wor
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!