assume that you often send packages from virginia to new york. create a program that calculates the shipping cost based on number of pounds. the rules are as follow: weight up to 5 pounds - $ 1.20 per pound 5 < weight

Answers

Answer 1

The program for find the shipping cost is:

$", shipping_cost(weight)) ```

How to create program

To create a program that calculates the shipping cost based on the number of pounds, you can use the following Python code:

```python def shipping_cost(weight): if weight <= 5: cost = weight * 1.20 else: cost = 5 * 1.20 + (weight - 5) * 1.30 return cost #

Example usage:

weight = float(input("Enter the weight of the package in pounds: ")) print("

The shipping cost is:

$", shipping_cost(weight)) ```

This program uses a function called `shipping_cost` to calculate the shipping cost based on the given weight rules. It then takes the weight input from the user and prints the calculated shipping cost. l

Learn more about programming language at

https://brainly.com/question/23959041

#SPJ11


Related Questions

Why TeamViewer stuck at initializing display parameters?

Answers

TeamViewer is stuck at initializing display parameters because the display driver might be out of date or corrupted, and it might also occur when the graphics card is malfunctioning.

How to solve stuck in Teamviewer

Follow the steps to resolve this problem:

Method 1: Update graphics card drivers.

1: Click on the Start button and select Device Manager from the search results.

2: Look for the Display Adapters option, expand it, and select your graphics card.

3: Right-click on your graphics card and choose Update Driver

4: Wait for the update to complete, then restart your computer to apply the changes.

Method 2: Roll back graphics card drivers.

1: Press Windows Key + X and select Device Manager from the list of options.

2: Look for the Display Adapters option, expand it, and select your graphics card.

3: Right-click on your graphics card and select Properties.

4: In the Properties window, select the Driver tab and click on the Roll Back Driver button.

5: Wait for the process to complete, then restart your computer to apply the changes.

Method 3: Disable hardware acceleration.

1: Right-click on the TeamViewer icon on your desktop and select Properties.

2: In the Properties window, click on the Compatibility tab.

3: Check the box next to Disable display scaling on high DPI settings and Disable fullscreen optimizations.

4: Click on the Change high DPI settings button.

5: In the High DPI scaling override section, check the box next to Override high DPI scaling behavior. Scaling performed by Application and click on the OK button.

6: In the Compatibility tab, click on the Change settings for all users button

7: Repeat Steps 3 to 5 for all users and click on the Apply button, then the OK button.If none of the methods work, you should reinstall TeamViewer.

Learn more about Teamviewer at

https://brainly.com/question/30792076

#SPJ11

programs designed for maintainability are constructed from small simple pieces or modules. modules in java are called: group of answer choices methods. classes. arguments. both methods and classes.

Answers

The modules in Java are called classes.

What are modules in programming?

Modules are the building blocks of a program that are constructed using small, simple components that make them easier to maintain. Programming languages include libraries that include sets of pre-written code that a developer can use to quickly and efficiently build programs. Classes and methods are two of the fundamental constructs in Java. Modules in Java are called classes. Classes in JavaClasses are one of the fundamental building blocks of Java programming. A class is a blueprint or a template for creating objects in a program. Classes are made up of fields, methods, and constructors. Fields are variables that store data, methods are functions that operate on that data, and constructors are methods that create objects. Classes in Java are used to create objects that are used in programs. A class defines the characteristics of an object, including its properties and methods. Classes are used to create objects and are the basic building blocks of object-oriented programming.

Learn more about modules  here: https://brainly.com/question/27682740

#SPJ11

match the image-editing tools with their features.

Answers

The main tools with which a user may manage, improve, and change images are graphic software programmes, which can be roughly categorised as vector graphics editors, raster graphics editors.

What kinds of features exist in images?

In computer vision and image processing, a feature is a piece of information about an image's content. It often pertains to whether a certain section of the image possesses particular characteristics.

What is a sample photo feature?

A feature image is a news image that provides more in-depth coverage for a news story or recent news story but has no compelling reason to appear alongside the top stories.

To know more about software  visit:-

https://brainly.com/question/985406

#SPJ1

which of the following is not an error (either a syntax error or a logic error)? question 10 options: an infinite loop. using a condition for a while statement that is initially false. spelling a keyword (such as while or if) with a capitalized first letter. neglecting to include an action in the body of a while statement that will eventually cause the condition to become false.

Answers

Spelling a keyword (such as while or if) with a capitalized first letter is not an error (either a syntax error or a logic error).

What are Syntax errors?

Syntax errors are mistakes made by programmers when writing computer code. They are errors in the syntax, spelling, or punctuation of the code. Syntax errors can stop your code from working or make it produce unexpected results.

What are Logic errors?

Logic errors are mistakes made by programmers when they misunderstand the requirements for a program. They are errors that produce an unexpected result, rather than a syntax error that stops the program from running.

Types of programming errors include:

Syntax errors.Runtime errors.Logic errors.

Syntax errors stop your code from running, while runtime errors are caused by problems with your code at runtime. Logic errors are the most challenging to detect and fix, as they involve correcting the logic of the code rather than fixing the syntax.

Spelling a keyword (such as while or if) with a capitalized first letter is not an error (either a syntax error or a logic error).Thus, the correct option is "spelling a keyword (such as while or if) with a capitalized first letter."

Learn more about syntax error at

https://brainly.com/question/28957248

#SPJ11

in a shortest path problem, each link will be assigned a number, and in the solution, each decision variable will also be assigned a number. what do those numbers represent?

Answers

In a shortest path problem, each link is assigned a number, and in the solution, each decision variable is also assigned a number. The numbers assigned to each link and decision variable represent the length or cost of that particular link or decision variable.

Let's say that a shortest path problem is given in the form of a network. The nodes are connected to each other with links or arcs, which have specific costs or lengths associated with them. The shortest path problem is then to find the least-cost path from the starting node to the destination node.When searching for the shortest path, each link or arc that is traversed in the path contributes to the overall cost of the path. Furthermore, each decision variable that is used to indicate whether a link or arc is included in the path or not also has a cost associated with it.Thus, each link and decision variable is assigned a number that represents its cost or length. In the shortest path solution, these numbers are used to determine the total cost of the path and to identify the links or arcs that are included in the path.Therefore, the numbers assigned to each link and decision variable in a shortest path problem are crucial in finding the optimal path.

for such more question on variable

https://brainly.com/question/28248724

#SPJ11

Other Questions
Which option is not a reason poets use imagery?A. To Draw the reader in and make a connection.B. To make details more difficult to understand.C. To pack a lot of meaning into few words. D. To create a rich sensory experience. help asap !! The following polygon is _______ and ________.A) concaved and regular in shapeB) concaved and irregular in shapeC) convexed and regular in shapeD) convexed and irregular in shape What stage does chromosomes align in center of cell?a. prophaseb. metaphasec. anaphased. telophase If 4a + 9b = 25 and ab = 8, find the value of (2a + 3b) Twice the difference of a number and 4 is 7 is it possible to block access to websites that originate in countries with a different indecency standard? Construct a polynomial function of least degree possible using the given information.Real roots: 1 (with multiplicity 2), 1 and (2, f(2)) = (2, 7) About 61% of students at a certain high school take the SATs. What is the probability of sampling five successive students at random until you find the first student to take the SATs? the nurse is caring for an 86-year-old client who fell at home and was not found for 2 days. the client is severely dehydrated. the client is at increased risk for fluid imbalance due to: first rentals purchased office supplies on credit. the general journal entry made by first rentals will include a: multiple choice debit to accounts payable. debit to accounts receivable. credit to cash. credit to accounts payable. credit to accounts receivable. Tests show that the lives of light bulbs arenormally distributed with a mean of 750 hoursand a standard deviation of 75 hours. Findthe probability that a randomly selected lightbulb will last between 675 and 825 hours.675 750 825 900 975P = [? ]%Hint: use the 68-95 99.7 rule.525 600Enter boat travels at velocity 45 mph in a direction 20.0osouth of west. Find the components of the boat's velocity 6.4 A pebble of mass, m is attached to one end of a high inelastic string of length, L. The other end of the string is fixed. The string is initially held taut to the horizontal and the pepple is then released. Find the values of the following quantities when the string reaches the vertical position: (I)The kinetic energy of the pepple (ii)The velocity of the pepple (III)The acceleration of the pepple and (iv) The tension in the string Todd is traveling to Mexico and needs to exchange $360 into Mexican pesos. If each dollar is worth 12.29 pesos, how many pesos will he get for his trip? a cardiologist is a kind of health care specialist that treats vision problems. True or False? what would be the ending amount if you deposit $500 in an account at the end of each 6-month period for 5 years and the account pays 6% compounded semiannually? your lab partner swabs the side of her face and uses the swab to inoculate a nutrient agar plate. the next day, she performs a gram stain on the colonies; she finds that they are gram-positive cocci. to narrow down the identification, what should she look for next? group of answer choices conidiospores pseudopods pseudohyphae an acid-fast reaction a coagulase reaction Water flows through a horizontal bend and discharges into the atmosphere as shown. When the pressure gauge reads 10 psi, the resultant x-direction anchoring force, FAX in the horizontal plane required to hold the bend in p lace is shown in the figure. Determine the flow rate through the bend and the y-direction anchoring force, FAY required to hold the bend in place. The flow is not frictionless. Ans: 7.01 ft^3/s and 674 lbs. DESCRIBE COMTON IN 30 SENTENSEAS OR 200 WORD Q1 The following diagram represents the positions and bearingsof two helicopters. Helicopter B is 1.2km away fromhelicopter A on a bearing of 122. How far north ishelicopter A from helicopter B?NHelicopter A12201.2kmNHelicopter B