Write the pseudo code for a program that determines the shipping cost for an order based on the following table:

To write the pseudo code for a program that determines the shipping cost for an order based on a table, you can follow these steps:

1. Define the shipping cost table: Create a table or data structure that maps order weights to their corresponding shipping costs.

2. Read the weight of the order from the user: Prompt the user to input the weight of the order.

3. Initialize the shipping cost variable: Set the shipping cost variable to zero.

4. Loop through the shipping cost table: Iterate through each entry in the shipping cost table.

5. Check if the weight of the order matches the current entry: Compare the weight of the order to the weight in the current table entry.

6. If there is a match, assign the corresponding shipping cost: If the weights match, assign the shipping cost from the table entry to the shipping cost variable.

7. Calculate the shipping cost if there is no exact match: If the weight of the order does not match any of the table entries, you can handle it in multiple ways. For example, you can assign a default shipping cost or interpolate the shipping cost based on the closest available weights.

8. Output the shipping cost: Display the calculated shipping cost for the order.

Here is an example of the pseudo code based on the steps described above:

```
1. Define the shipping cost table:
shipping_table = { 1 kg : $5,
5 kg : $10,
10 kg : $15,
20 kg : $20
}

2. Read the weight of the order:
order_weight = input("Enter the weight of the order in kg: ")

3. Initialize shipping cost:
shipping_cost = 0

4. Loop through the shipping cost table:
for weight, cost in shipping_table:
5. Check if the weight of the order matches the current entry:
if order_weight == weight:

6. Assign the shipping cost:
shipping_cost = cost
break

7. Calculate the shipping cost if there is no exact match:
if shipping_cost == 0:
# Assuming linear interpolation
nearest_lower_weight = get_nearest_lower_weight(order_weight) # Implement a function to get the nearest lower weight from the shipping_table.
nearest_upper_weight = get_nearest_upper_weight(order_weight) # Implement a function to get the nearest upper weight from the shipping_table.
nearest_lower_cost = shipping_table[nearest_lower_weight]
nearest_upper_cost = shipping_table[nearest_upper_weight]
shipping_cost = interpolate_cost(order_weight, nearest_lower_weight, nearest_upper_weight, nearest_lower_cost, nearest_upper_cost) # Implement a function to interpolate the cost.

8. Output the shipping cost:
print("The shipping cost for the order is: $" + shipping_cost)
```

Please note that this pseudo code assumes certain functions and operations may not be defined explicitly, such as interpolation calculations and finding the nearest lower and upper weights. You would need to implement those based on your programming language and specific requirements.