Create a program that determine the shipping cost for an order based on the following table:

From
$0.00
$20.00
$50.00
$75.00

To
$19.99
$49.99
$79.99
$1000.00

Price
$2.95
$3.95
$4.95
Free

here's some perl. Modify to suit your needs:

@cost = (0.00,0.00,20.00,50.00,75.00);
@ship = (0.00,2.95,3.95,4.95,0.00);
while (1) {
print "Enter order amount: \$";
$c = <STDIN>;
for ($i = $#cost ; $i > 0 ; $i--) {
last if $c >= $cost[$i];
}
printf "Shipping: \$%4.2f\n",$ship[$i];
}

My teacher said this is not the right. Were doing Raptor Program.

Why did the shipping prices go overboard? Because they wanted to make a splash! But don't worry, I've got you covered. Here's a program that will help you determine the shipping cost for your order:

```python
def get_shipping_cost(order_price):
if order_price < 0:
return "Invalid order price. Please enter a positive number."
elif order_price < 20:
return "$2.95"
elif order_price < 50:
return "$3.95"
elif order_price < 75:
return "$4.95"
else:
return "Free"

order_price = float(input("Enter the order price: $"))
shipping_cost = get_shipping_cost(order_price)
print(f"The shipping cost for this order is: {shipping_cost}")
```

Now you can sail through your order knowing exactly what the shipping cost will be. Smooth sailing, my friend!

Sure! Here's a step-by-step guide to create a program that determines the shipping cost for an order based on the given table:

Step 1: Define the shipping cost table:
- Create two lists to store the 'From' prices and the corresponding 'To' prices.
- Create a third list to store the shipping prices.

from_prices = [0.00, 20.00, 50.00, 75.00]
to_prices = [19.99, 49.99, 79.99, 1000.00]
shipping_prices = [2.95, 3.95, 4.95, 0.00]

Step 2: Get user input for the order amount:
- Prompt the user to enter the order amount and store it in a variable.

order_amount = float(input("Enter the order amount: "))

Step 3: Determine the shipping cost:
- Iterate through the 'from_prices' and 'to_prices' lists to find the appropriate range for the order amount.
- Use the corresponding index to get the shipping cost from the 'shipping_prices' list.

shipping_cost = 0.00

for i in range(len(from_prices)):
if order_amount >= from_prices[i] and order_amount <= to_prices[i]:
shipping_cost = shipping_prices[i]
break

Step 4: Display the shipping cost:
- Print the shipping cost to the user.

print("The shipping cost for this order is $" + str(shipping_cost))

That's it! You have successfully created a program that determines the shipping cost for an order based on the given table.

To create a program that determines the shipping cost for an order based on the given table, you can use conditional statements or a lookup table approach.

Here's an example of how you can achieve this using conditional statements in Python:

```python
def calculate_shipping_cost(order_amount):
if order_amount >= 0.00 and order_amount < 20.00:
return 2.95
elif order_amount >= 20.00 and order_amount < 50.00:
return 3.95
elif order_amount >= 50.00 and order_amount < 75.00:
return 4.95
elif order_amount >= 75.00:
return "Free"
else:
return "Invalid order amount"

order_amount = float(input("Enter the order amount: $"))
shipping_cost = calculate_shipping_cost(order_amount)
print("The shipping cost for your order is:", shipping_cost)
```

In this program, the `calculate_shipping_cost` function takes the order amount as input and uses if-elif-else statements to determine the shipping cost based on the given table. The function returns the shipping cost or "Invalid order amount" if the given order amount is outside the specified range.

You can run this program and enter the order amount when prompted to calculate the shipping cost.

Alternatively, if you prefer a lookup table approach, you can use a dictionary to map the order amount ranges to the corresponding shipping costs. Here's an example:

```python
shipping_table = {
(0.00, 20.00): 2.95,
(20.00, 50.00): 3.95,
(50.00, 75.00): 4.95,
(75.00, 1000.00): "Free"
}

def calculate_shipping_cost(order_amount):
for amount_range, cost in shipping_table.items():
if amount_range[0] <= order_amount < amount_range[1]:
return cost
return "Invalid order amount"

order_amount = float(input("Enter the order amount: $"))
shipping_cost = calculate_shipping_cost(order_amount)
print("The shipping cost for your order is:", shipping_cost)
```

In this approach, the `shipping_table` dictionary is used to store the order amount ranges as keys and the corresponding shipping costs as values. The `calculate_shipping_cost` function iterates over the dictionary items, checks if the order amount falls within the range of each key, and returns the associated cost. If the order amount is outside all the specified ranges, it returns "Invalid order amount".