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
Westkost [7]
3 years ago
6

Write a program that solves the following problem:

Computers and Technology
1 answer:
Sedbober [7]3 years ago
6 0

Answer:

def main():

   singleMarkerPrice = 0.80

   packageOfMarkersPrice = 3.50

   tax = 0.065

   shipping = 0.050

   userInput = int(input("How many markers do you want? "))

   amountOfPackages = 0

   singleMarkers = 0

   if userInput % 5 == 0:

       amountOfPackages = userInput / 5

   else:

       amountOfPackages = userInput // 5

       singleMarkers = userInput % 5

   # Just for syntax so if the single marker amount is one, it prints package instead of packages

   if amountOfPackages == 1:

       print("You have " + str(int(amountOfPackages)) + " complete package")

   else:

       print("You have " + str(int(amountOfPackages)) + " complete packages")

   # Just for syntax so if the single marker amount is one, it prints marker instead of markers

   if singleMarkers == 1:

       print("You have " + str(int(singleMarkers)) + " single marker")

   else:

       print("You have " + str(int(singleMarkers)) + " single markers")

   totalAmountBeforeTax = (amountOfPackages * packageOfMarkersPrice) + (singleMarkers * singleMarkerPrice)

   print("The total amount before tax comes out to " + str(float(totalAmountBeforeTax)))

   costOfShipping = float(round((totalAmountBeforeTax * shipping), 2))

   costOfTax = float(round((totalAmountBeforeTax * tax), 2))

   print("The cost of shipping is " + str(costOfShipping))

   print("The cost of tax is " + str(costOfTax))

   totalAmount = totalAmountBeforeTax + costOfShipping + costOfTax

   print("The total amount comes out to " + str(round(totalAmount, 2)))

main()

Explanation:

This should be correct. If it isn't let me know so I can fix the code.

You might be interested in
What are the trinity of the computer system
zimovet [89]

Answer:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

Explanation:

he Computer, the System, and the World. Simics is a great product for simulating computer systems that contain processors and execute code.

3 0
3 years ago
. An access specifier is one of three keywords:
Zolol [24]

Answer:

Access specifiers are used to control the visibility of members like classes, variables and methods. There are three access specifiers: public, private and protected. We shall see only about the public and private access specifiers for now. Protected access specifier comes into picture when inheritance is implemented. plz brainly me

Explanation:

8 0
3 years ago
The ________ contains the central electronic components of the computer. select one:
Sati [7]
The motherboard contains the central electronic components of the computer.
6 0
3 years ago
Which of the following is the best way to make sure you understand what someone has said?
aivan3 [116]

Answer:

I would choose either paraphrase the info or take notes.

Explanation:

8 0
3 years ago
Read 2 more answers
Which of the following rules need to be followed when using variables?<br> Choose all that apply.
Masja [62]

Answer:

- All variable names must begin with a letter of the alphabet or an. underscore( _ ).

-After the first initial letter, variable names can also contain letters and numbers.

-Uppercase characters are distinct from lowercase characters.

-You cannot use a C++ keyword as a variable name.

7 0
3 years ago
Read 2 more answers
Other questions:
  • You are writing a report using a template provided by your supervisor. If you increase the margins around your pages by 30 perce
    5·1 answer
  • Consider the following two implementations of the same algorithm, each written in a different language.
    11·1 answer
  • "You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all t
    8·1 answer
  • What best describes a firewall
    11·1 answer
  • Which of the following players is on offence
    9·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    9·2 answers
  • (in order of a-z)
    12·1 answer
  • Operational level management can be supported by the systems except Select one: 01. Transaction Processing System 2. Manufacturi
    12·1 answer
  • Consider an individual who wishes to ensure that their information remains secure and confidential, possibly to secure their per
    12·1 answer
  • What is the current situation of drone technology in emergency rescue and recovery
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!