Mrs. Beckner is going to Hawaii. She plans to learn to surf. The Surf Hut company charges an initial fee of $65 for the lesson plus $2.50 for each hour she uses the surfboard.(2 points)

The number of hours is the [ ]. The total cost of the surf lesson and surfboard is the [ ].

Write a function for the total cost of the surf lesson and surfboard rental.(1 point)

1 answer

The number of hours is the input variable. The total cost of the surf lesson and surfboard rental is the output variable.

Function: total_cost(hours)

Algorithm:
1. Set the initial fee variable to 65.
2. Set the hourly rate variable to 2.50.
3. Calculate the cost of surfboard rental by multiplying the hourly rate by the number of hours.
4. Add the initial fee to the cost of surfboard rental to get the total cost.
5. Return the total cost.