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
Hilarious error messages
Lilit [14]

Answer:

F

Explanation:

7 0
2 years ago
Read 2 more answers
"PindCart, an online retailer, places a small file on the computer hard drive of its visitors to recognize them when they revisi
photoshop1234 [79]

Answer:  cookie

Explanation:

  • A cookie is a small welcome file contains the information in the form og letters and numbers.
  • It is downloaded on to a computer when a website is visited.

Hence, if a company uses a small file on the computer hard drive of its visitors to recognize them when they revisit their Web site to generate a personalized welcome message to its visitors. This small file is called <u>a cookie</u>.

3 0
3 years ago
On the food inventory worksheet, enter a function in cell G1 that counts the number of Food Items. What formula would i use!? Th
Nataly [62]

COUNT function

COUNT function determines how many cells in a range contain a number. We use this function to get the number of entries in a number field in an array of numbers. The formula one can use is G1:[…..]: = COUNT(G1:[…..])






3 0
3 years ago
The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
VLD [36.1K]

Answer:

IoE(Information of Everything)  is the correct answer to the following question.

Explanation:

The following answer is correct because it is the concept that process, data, people and also Internet of Things brings together by which the network connection become more valuable and more compatible as compared to before and also it can extend the IoT(Internet of Things).

So, that's why the following answer is correct.

8 0
3 years ago
Which two climates have moderate rainfall and experience warm summers and cold winters due to their position relative to mountai
77julia77 [94]
Most probably grassland and steppes
6 0
2 years ago
Other questions:
  • To set up a slide show you should do all of the following except ______.
    9·1 answer
  • Just forgot where she saved a certain file on her computer therefore she searched for all files with jpg file extension which ty
    13·2 answers
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • Which clauses in the Software Engineering Code of Ethics are upheld by a whistleblower (check all that apply). "Respect confiden
    15·1 answer
  • List the operating system you recommend, and write a sentence explaining why.
    8·1 answer
  • A student will not be allowed to sit in exam if his/her attendance is less than 75% .
    8·1 answer
  • In binary, the second digit from the right is multiplied by the first power of two, and the _____ digit from the right is multip
    10·2 answers
  • Why is it important to isolate evidence-containing devices from the internet?
    11·1 answer
  • Create a vector of structures experiments that stores information on subjects used in an experiment. Each struct has four fields
    12·1 answer
  • You can put ______ on your phone.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!