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
ruslelena [56]
4 years ago
7

Write a program to implement the algorithm that you designed in Exercise 21 of Chapter 1. Your program should allow the user to

buy as many items as the user desires.
Reference:

The number in parentheses at the end of an exercise refers to the learning objective listed at the beginning of the chapter.

Jason typically uses the Internet to buy various items. If the total cost of the items ordered, at one time, is $200 or more, then the shipping and handling is free; otherwise, the shipping and handling is $10 per item. Design an algorithm that prompts Jason to enter the number of items ordered and the price of each item. The algorithm then outputs the total billing amount. Your algorithm must use a loop (repetition structure) to get the price of each item. (For simplicity, you may assume that Jason orders no more than five items at a time.) (9)
Computers and Technology
1 answer:
Murrr4er [49]4 years ago
4 0

Answer:

total = 0

items = int(input("Enter the number of items ordered: "))

for i in range(items):

   price = float(input("Enter the price of item " + str(i+1) + ": "))

   total += price

if total < 200:

   total += (items * 10)

   

print("Bill is $" + str(total))

Explanation:

*The code is in Python.

Ask the user to enter the number of items ordered

Create a for loop that iterates depending on the number of items ordered. Inside the loop, ask the price of each item and add it to the total

After the loop, check the total. If it is smaller than 200, add 10 for each item to the total

Print the total

You might be interested in
The IV tubing and hub connection site should be left free of tape and uncovered from the dressing so that it can be visually ins
ra1l [238]

Answer:

True

Explanation:

Based on the information provided within the question it can be said that this statement is completely True. The IV tubing and hub need to be easily accessible and able to be visually inspected at all times since all liquids, including medicine enter the patients body through the IV line. Therefore any blockage or error can be life threatening and the problem in the tubing or hub need to be detected immediately and solved, which is why all IV equipment is transparent.

3 0
3 years ago
23. ____________ is a slide that is used as the base design theme for other slides.​
MatroZZZ [7]

Hmmmmmmmmm, <u>powerpoint</u>?

5 0
3 years ago
Which shortcut brings up the Print screen?
sashaice [31]

The answer is alt + prt sc

5 0
3 years ago
Read 2 more answers
Given table R(A,B,C) and S(C,D,E), which of the following SQL statements would find the record(s) with null values on the column
sashaice [31]

Answer:

a. select * from R, S where R.C = S.C (+); (R left outer join S)

Explanation:

In SQL, left outer join of two tables R and S joined on a common column C means that all rows of R are included in the result including those rows for which value of R.C is null. On the contrary, right outer join of two tables R and S joined on a common column C means that all rows of S are included in the result including those rows for which value of S.C is null. As per the question our requirement is the former. So option a is correct.

4 0
4 years ago
Tell me 5 jokes. its for my comdey class
Lubov Fominskaja [6]
If you have 13 apples in one hand and 10 oranges in the other, what do you have?

Big hands.

7 0
3 years ago
Other questions:
  • The number of credits awarded for the CLEP exam is determined by__<br> Help pls!
    15·1 answer
  • The most common cause of foodborne illness is
    12·2 answers
  • The following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) — (Weight x 0.09
    11·1 answer
  • Which flowchart symbol is called the process symbol and contains the steps or actions in the process being depicted?
    6·2 answers
  • To uncompress the data back into its original binary state. True or False
    13·1 answer
  • Are the blank space around the edges of the page
    5·1 answer
  • What do you use the Pygame library for?
    6·1 answer
  • Why are GUI operating system more popular than CUI operating system these days?​
    15·1 answer
  • The rectangle shape in flowchart is used for
    12·1 answer
  • Which type of photographer documents plants and weather in their natural habitat?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!