Vacation Budget

← All samples

vacation-budget.dply
1---
2version: 0.1.0
3precision: 2
4form_title: Vacation Budget Planner
5form_description: Plan your vacation budget. Enter travel costs, daily accommodation and food expenses, and your activity budget to see the total cost and how much you need to save per month.
6form_inputs: Travel cost (per person)|travel_cost{€}, Accommodation per night|accommodation{€}, Food per day|food{€}, Activities budget|activities{€}, Duration|nights{days}, Number of people|people{}
7form_outputs: Total accommodation|total_accommodation, Total food|total_food, Total cost|total_cost, Cost per person|cost_per_person, Monthly savings needed|monthly_savings
8---
9# draftply – Vacation Budget Planner
10# How much will your dream vacation really cost?
11
12# ── Inputs ────────────────────────────────────────────
13travel_cost = 300# flights, train, etc. per person
14accommodation = 80# hotel/airbnb per night
15food = 40# meals per day per person
16activities = 500# planned activities total
17nights = 14 # duration of stay in days
18people = 2 # number of travelers
19
20# ── Calculations ──────────────────────────────────────
21days = nights # same as nights for this calculation
22
23# Accommodation: often per room, not per person
24# Assuming 1 room for 2 people, 2 rooms for 3-4 people, etc.
25rooms = ceil(people / 2)
26total_accommodation = accommodation * nights * rooms
27
28# Food: per person per day
29total_food = food * days * people
30
31# Total travel costs for all people
32total_travel = travel_cost * people
33
34# Total vacation cost
35total_cost = total_travel + total_accommodation + total_food + activities
36
37# Cost per person
38cost_per_person = total_cost / people
39
40# Monthly savings needed (assuming you want to save over 6 months)
41savings_months = 6
42monthly_savings = total_cost / savings_months
43
44# ── Results ─────────────────────────────────────────────
45"Travel costs (total)": total_travel
46"Accommodation (total)": total_accommodation
47"Food (total)": total_food
48"Activities": activities
49
50"Total vacation cost": total_cost
51"Cost per person": cost_per_person
52
53"Save per month for 6 months": monthly_savings
54"Save per month for 12 months": total_cost / 12
55