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
Ksenya-84 [330]
4 years ago
13

write an algorithm that gets two values: the price for item A and the quantity purchased. The algorithm should then print the to

tal cost and the total cost plus an 8% sales tax.

Computers and Technology
1 answer:
pochemuha4 years ago
5 0

Answer:

Explanation:

price = eval(input("price of item: "))

quantity = eval(input("quantity of item: "))

sales_tax = 0.08 # 8% sales tax

total_cost = price*quantity

total_cost_with_tax = total_cost + total_cost*sales_tax

print("total cost: "+str(total_cost))

print("total cost + 8% sales tax: "+str(total_cost_with_tax))

You might be interested in
Writea SELECT statement that uses the ranking functions to rank products by the total quantity sold. Returnthese columns:The pro
Nataliya [291]

Answer:

SELECT  product_name, SUM(DISTINCT quantity) AS total_quantity

RANK() OVER (PARTITION BY total_quantity ORDER BY product_name) AS rank,

DENSE_RANK () OVER (ORDER BY quantity DESC) AS dense_rank

FROM Order_items

JOIN products ON Order_items.product_id = products.product_id

GROUP BY product_id

Explanation:

The SQL query returns four columns namely, product name, total quantity, rank and dense rank. The query uses the rank and the dense rank function to return the rows according to numeric ranks.

5 0
3 years ago
kelly wants to buy a new operating system for a laptop. under which category will it be in online store?
GuDViN [60]

Answer:

Kelly should look at the electronics section, where the laptops are because a laptop is an electronic. Just like an iPhone, iPad, and a TV.

7 0
4 years ago
The "c" key and the "e" key are struck by
adoni [48]
1 because when you type on the home row your left middle finger will hit both of those letters.
3 0
3 years ago
Read 2 more answers
Write a method named quarterstodollars. the method should accept an int argument that is a number of quarters, and return the eq
enyata [817]
 public static void quarterstodollars(String[] args) {    Scanner input = new Scanner(System.in);    System.out.println("Enter number of Quarters:");
    System.out.print("Quarters:");    int Q1 = input.nextInt();
DecimalFormat fmt = new DecimalFormat("$#,###.##");    System.out.println("Total:"+fmt.format(calctotal(Q1)));}public static double calctotal(int Q1) {    double total;    total=(0.25 * Q1);    return (total);}

Hope this helps!
7 0
4 years ago
Read 2 more answers
Create a text file named employee.dat containing the following data: b. Write a C++ program to read the employee.dat file create
Paul [167]

Answer:

1000 500 250 125 the output

Explanation:

write a program using integers userNum and x as input,  userNum divided by

x four times.  EX : If  the input is 2000 2 the output is 1000 500 250 125

8 0
3 years ago
Other questions:
  • .All of the following are true with the respect to implicitinvocation except:
    8·1 answer
  • Que es lo que me recomiendan estudiar? :v
    10·1 answer
  • You will write a program that generates random drawings that can be drawn using the shape painter.
    5·1 answer
  • Which description of the plain text file format is most accurate?
    10·1 answer
  • _____ creates a border or space that separates information.
    14·1 answer
  • Alex builds a 1 GHz processor where two important programs, A and B, take one second each to execute. Each program has a CPI of
    6·1 answer
  • Which of the following statements about security in the network is true?
    15·1 answer
  • Your ISP connects to the core routers of the Internet via a O backbone O satellite O cable mode Ospine​
    9·1 answer
  • TASK 1. JUMBLE ME! Direction: Arrange the jumbled letters to form a word. 1. PEREAM 2. RRENT CU 3. METREMO H 4. TORSISER 5. TANC
    10·1 answer
  • Question 2 of 10
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!