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
Fantom [35]
3 years ago
10

Write a Python 3 program that will compute the total cost of an amazon purchase. The program should ask the user to enter the am

ount of a purchase, then calculate a 12% shipping and handling fee and NJ sales tax (7%). Your program should show the itemized bill.
Computers and Technology
1 answer:
valentina_108 [34]3 years ago
3 0

Answer:

price = float(input("Enter amount of a purchase: "))

shipping_price = 0.12* price

NJ_sales_Tax = 0.07*price

print('The price of item is {}'.format(price))

print('The Cost of Shipping is {}'.format(shipping_price) )

print('New Jessey Sales Tax is {}'.format(NJ_sales_Tax))

total_bill = shipping_price+NJ_sales_Tax+price

print('Total Bill {} ' .format(total_bill))

Explanation:

  • Prompt User for input of the amount of purchase
  • Calculate the shipping cost (12% of purchase price)
  • Calculate the tax (7% of the purchase price)
  • Use python's .format method to output an itemized bill

You might be interested in
PLEASE HURRY!!<br> Look at the image below
vlada-n [284]

Answer:

Parameter

Explanation:

A parameter is a variable/argument of a function that are placed between the parentheses in the function's definition.

Hope this is clear :)

5 0
3 years ago
How long would you need to work at McDonalds to earn enough money to buy a optiplex 3050, monitor, mouse and keyboard all from d
r-ruslan [8.4K]
So assuming you were buying this piece of trash with the mouse and keyboard it would be around $450. Average pay per hour is $9.10-$10.20 depending on were you live so we will just say $9.50. You'd need to work rougly 47 hours (without taxes) So i'd say 65-75 Hours.
8 0
3 years ago
Read 2 more answers
HTTP is made to facilitate which kind of communication?
vlada-n [284]

Answer:

Computer to computer.

Explanation:

HTTP facilitates the connection between websites, so the answer is computer to computer.

5 0
3 years ago
||Can candid / posed pictures be about animals??||
Mumz [18]

Yes, they can involve animals! Hope this helps(:

6 0
3 years ago
Write a code in C++ that can save 100 random numbers in an array that are between 500 and 1000. You have to find the average of
Anni [7]

Answer:

#include <iostream>

#include <random>

//here we are passing our array and a int by ref

//to our function called calculateAverage

//void is infront because we are not returning anything back

void calculateAverage(int (&ar)[100], int &average){

 int sum = 0;

 for(int i = 0;i < 100; i++){

   //adding sum

   sum += ar[i];

 }

 //std:: cout << "\naverage \t\t" << average;

//calculating average here

 average += sum/100;

}

int main() {

 int value = 0;

 int average = 0;//need this to calculate the average

 int ar[100];

 //assign random numbers from 500 to 1000

 //to our array thats called ar

 for(int i = 0; i < 100; i++){

   value = rand() % 500 + 500;

   ar[i] = value;

   

 }

 calculateAverage(ar,average);

 // std:: cout << "\naverage should be \t" << average;

 

}

Explanation:

not sure how else this would work without having to pass another variable into the function but I hope this helps!

I commented out the couts because you cant use them according to ur prof but I encourage you to cout to make sure it does indeed calculate the average!

3 0
3 years ago
Other questions:
  • The process of changing a program’s internal structure without changing the way the program works is ______________.
    13·1 answer
  • A new company starts up but does not have a lot of revenue for the first year. Installing anti-virus software for all the compan
    11·1 answer
  • Write a program that calculates payments for loan system. Implement for both client and Server. - The client sends loan informat
    8·2 answers
  • How does LinkedIn differ from other popular social media platforms? What are the similarities?
    6·1 answer
  • • What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in
    12·1 answer
  • You would like to enter a formula that subtracts the data in cell B4 from the total of cells B2 and B3. What should the formula
    10·1 answer
  • The acronym pies is used to describe improvised explosive devices (ied) components. pies stands for:
    13·2 answers
  • How do we Rewrite the following Python code to avoid error. mark=inpt("enter your mark ")
    6·1 answer
  • 2. The On and Off states are represented by _____________ class 7 number system​
    7·2 answers
  • WILL GIVE BRAINLIEST!! NO LINKS!!!
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!