Amusement Park Problem

An amusement park charges $18 per person for entry. A group of friends is going together. There is also a $25 parking fee for the whole group. Write an expression for the total cost where p is number of people.

$18
×
p
Entry Fee
Cost per person × People
+
$25 Parking
One-time fee per group
Why "+"?Total = Entry AND Parking
=
18p + 25
Total Cost Equation

Amusement Park Cost

Planning a trip? Math expressions help us budget. Let's calculate the total cost for a group of friends visiting an amusement park.
Continue

1. The Variable Cost

Entry is $18 per person. Since the number of people can change, this is our variable. If 'p' friends go, the entry cost is 18 × p.
Continue

2. The Fixed Cost

There's a $25 parking fee for the whole group. Whether 1 person goes or 5 people go, this one-time fee stays the same.
Continue

3. Total Expression

Add them up! We use '+' because the total cost includes BOTH the entry fees AND the parking fee together. Total Cost = (Entry Cost) + (Parking). Expression: 18p + 25.
Continue

Your Turn

Practice with new prices. Understanding this structure helps with any scenario involving 'per unit' costs plus 'flat fees'.
Continue

Calculating Group Budget

Functions allow us to calculate costs for any group size instantly.

calculateTripCost.js
function calculateTripCost(people) {
  const entryPerPerson = 18; // $18/person
  const parkingFee = 25;     // Flat fee
  
  // Expression: 18p + 25
  return (entryPerPerson * people) + parkingFee;
}

// 4 friends going:
console.log(calculateTripCost(4)); 
// Calculation: (18 * 4) + 25 = 72 + 25 = 97
// Output: 97
Budget Calculator Function
AlgoAnimator: Interactive Data Structures