Write a Python program for an online MoonBucks coffee order. Coffee is sold by the pound, and the price per pound depends upon the quantity ordered according to the table shown below. Partial pounds are not sold. Shipping is $1.00 per pound, but free for coffee orders over $150 before tax. The user must enter the number of pounds desired from the keyboard. The program will then display the cost of the coffee, the 7% sales tax, shipping charges (if any) and the total amount due. All four values s
Category: Python
Write Python code to compute the value of the Boolean expression that checks whether a point with coordinates (5, 5) is inside a circle with center (0,0) and radius 7.
Define a function trophiclevelindex(chla , tn, tp) that takes values for Chorophyll-a (CHLA), Total Nitrogen (TN), and Total Phosphorus (TP) and returns the Trophic Index (TLI3) using the calculation below.
Define a function trophic_level_index(chla , tn, tp) that takes values for Chorophyll-a (CHLA), Total Nitrogen (TN), and Total Phosphorus (TP) and returns the Trophic Index (TLI3) using the calculation below. The TLI3 is calculated as the average of the three transformed values, where each value is transformed as follows: tlc = 2.22 + 2.54 ∗ log10CHLA tln = −3.61 + 3.01 ∗ log10TN tlp = 0.218 + 2 .92 ∗ log10TP For example, if CHLA = 10, TN = 100, and TP = 1000, then: tlc = 2.22 + 2.54 ∗ 1 =
Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced.
6.19 LAB: Replacement words Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced. Ex: If the input is: automobile car manufacturer maker children kids The automobile manufacturer recommends car seats for children if the automobile doesn’t already have one. the output is: The car maker recommends car seats for kids if the car doesn’t a
Update the program you wrote for Q11 so that it can now zip strings of different lengths.
Create a complete python program, that asks the user for the number of eggs in a basket.
Produce a complete python program, that asks the user for the number of eggs in a basket. The program reports the number of dozens of eggs in the basket and the number of eggs left over.