Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a number of miles driven and a current cost per gallon. The program computes and displays the cost of the trip as well as the cost if gas prices rise by 10 percent. The program accepts data continuously until 0 is entered for the number of miles. Use appropriate modules, including one that displays End of program when the program is finished. This is my problem any help is appreciated

The Daily Gazette accepts classified ads in several categories. For most ads, the newspaper charges 10 cents per word for the first 50 words, and 8 cents per word for every word after that. Design a flowchart or pseudocode for a program that accepts data about and ad: customer name, ad category, and number of words. Display all the input data and the price for the add.

To solve this problem, we can use a hierarchy chart to visually represent the structure of the program. Here is a simplified hierarchy chart for the given problem:

- Main
- Prompt for miles driven
- Prompt for current cost per gallon
- Call calculate_trip_cost function passing miles driven and cost per gallon
- Call calculate_trip_cost function passing miles driven and cost per gallon + 10%
- Display the cost of the trip and the cost if gas prices rise by 10%
- calculate_trip_cost
- Accept miles driven and cost per gallon as parameters
- Calculate the total cost of the trip by dividing the miles driven by 20 (miles per gallon) and multiplying it by the cost per gallon
- Return the total cost of the trip

Based on this hierarchy chart, we can now design the logic for the program. Here is a possible solution using Python:

```python
# Function to calculate trip cost
def calculate_trip_cost(miles_driven, cost_per_gallon):
return (miles_driven / 20) * cost_per_gallon

# Main program
while True:
# Prompt for miles driven
miles_driven = float(input("Enter the number of miles driven (0 to exit): "))

if miles_driven == 0:
print("End of program")
break

# Prompt for current cost per gallon
cost_per_gallon = float(input("Enter the cost per gallon: "))

# Calculate trip cost
trip_cost = calculate_trip_cost(miles_driven, cost_per_gallon)
trip_cost_increase = calculate_trip_cost(miles_driven, cost_per_gallon * 1.10)

# Display the cost of the trip and the cost with a 10% increase
print("Cost of the trip: $", trip_cost)
print("Cost if gas prices rise by 10%: $", trip_cost_increase)
```

In this program, we continuously prompt the user for the number of miles driven and the current cost per gallon. If the number of miles driven is 0, the program displays "End of program" and exits the loop. Otherwise, it calculates the trip cost by calling the `calculate_trip_cost` function and displays the result. It also calculates the cost with a 10% increase by multiplying the cost per gallon by 1.10 before calling the same function.

Note: This is a simplified solution and does not include error handling or formatting of the output. You may need to modify it further to meet your specific requirements.

Assuming the oceans level is currently rising at about 1.5 millimeters per year, write a program that displays a table showing the number of millimeters that the ocean will have risen each year for the next 25 years.

draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user’s car travels 20 miles per gallon of gas. Design a program that prompts the user for a number of miles driven and a current cost per gallon. The program computes and displays the cost of the trip as well as the cost of gas prices rise by 10 percent. The program accepts data continuously until 0 is entered for the number of miles. Use appropriate modules, including one that displays End of program when the program is finished.