← Back to Education
Education digital-technologies year-9

Build the Booking System

The main build lesson for turning the Pet Services plan into a working Python booking system.

Published Updated Type activity

This page turns the project plan into code. It moves from structured input and decisions toward a usable booking summary.

Project Navigation

Build Sequence

  1. collect all required input values
  2. validate service type and key fields
  3. calculate total cost with conditional logic
  4. print a clean booking summary

Minimal Working Pattern

pet_name = input("Pet name: ")
pet_size = input("Size (small/medium/large): ").lower()
service_type = input("Service (bath/haircut/full): ").lower()

if service_type == "bath":
    base_cost = 25
elif service_type == "haircut":
    base_cost = 35
elif service_type == "full":
    base_cost = 50
else:
    base_cost = None

if base_cost is None:
    print("Invalid service type. Please run again.")
else:
    print("=== Booking Summary ===")
    print("Pet:", pet_name)
    print("Size:", pet_size)
    print("Service:", service_type)
    print("Total cost: $", base_cost)

Quality Checks

  • invalid service types are handled safely
  • all required details appear in output
  • cost logic is easy to trace back to your planning map
Pet Services Program (Generating)

Lesson 2: Generating the Pet Service

Mini Project: Pet Service Booking System

Project Overview

We will create a Python program that simulates some type of pet grooming service. The program will collect and interpret information from the user to create a booking summary and calculate a cost.

Project Requirements

1) User Input
  • Pet name
  • Pet breed
  • Pet’s age (in human years)
  • Another characteristic of pet (example: size)
  • Type of service requested (bath, haircut, full grooming)
2) Conditional Statements
  • Calculate the total cost of the service based on certain characteristics of the pet
3) Output
  • Display a summary of the booking including all the information about the pet that the user input at the start of the program

Lesson 2: Learning Intention

  • I can convert my decision tree into a functioning Python program.
  • I understand how to store variables and use conditional statements to create a program where user input impacts outcomes.

How we will build the program (3 phases)

  1. Collecting and storing the user inputs
  2. Validating and manipulating the data
  3. Generating the final booking confirmation
Key idea: Your decision tree becomes your code. Each diamond becomes an input() or an if / elif / else check. Each rectangle becomes a print().
Activity
Description
Assessment Criteria
Program implementation
Phase 1
1) Collecting and storing the user inputs

In the code below you can see that the program asks for user input and stores that information in a variable with an appropriate name. You will need to replicate a similar idea for your pet services program.

Terminal
# Collecting user input
dog_name = input("What is your dog's name? ")
dog_breed = input("What breed is your dog? ")
dog_age_human = int(input("How old is your dog (in human years)? "))
Note: If you want a number you can do maths with, you must convert it.
Remember input() always gives you text (a string), so for ages and prices you will often need: int(input("..."))
Proficient implementation of a program that includes functioning and purposeful use of iteration, conditional statements, functions, variables and user input.
Program implementation
Phase 2
2) Validating and manipulating the data

In my program I decided to convert the dog’s human age to dog years. This requires the dog’s age in human years to be stored as an integer. The code below multiplies this value by 7 before displaying the age in dog years on the final booking confirmation.

Terminal
# Converting human age to dog years
dog_age_dog_years = dog_age_human * 7

The code also checks what size the dog is and changes the price accordingly. You will need to work out what features of your program require you to check or manipulate the data.

Terminal
# Determining the price based on dog size
if dog_size == "small":
    price = 30
Hints for your pet service version
  • Think about which inputs affect cost (service type, size, age, breed).
  • Use .lower() to make comparing inputs easier (example: "Small" and "small" become the same).
  • If you want to check if an answer is valid, you can compare it to a list of allowed options.
Proficient implementation of a program that includes functioning and purposeful use of iteration, conditional statements, functions, variables and user input.
Program implementation
Phase 3
3) Generating the final booking confirmation

When we display the final booking confirmation for the user, there are some clever ways we can use formatting to display text that includes information from our stored variables.

  • \n prints the string on a new line
  • f in f"..." means a formatted string (f-string). It lets you insert variables using { }.
  • .capitalize() makes the first letter uppercase (useful for names)
Terminal
# Displaying the booking summary
print("\n🐾 Booking Summary 🐾")
print(f"Dog's Name: {dog_name.capitalize()}")
print(f"Breed: {dog_breed}")
Your job now: code your program so it prints a full booking confirmation that includes the user’s inputs and the final price.
Proficient implementation of a program that includes functioning and purposeful use of iteration, conditional statements, functions, variables and user input.

✅ Lesson 2 Student Checklist

☐ I have created variables for each user input (pet name, breed, age, size, service).

☐ I used int(input("...")) for any value I want to do maths with (like age).

☐ I used if / elif / else to set a price based on pet characteristics and the selected service.

☐ My program prints a clear booking summary that includes every key piece of input data.

☐ My program prints the final total cost.

☐ My output is readable (new lines, headings, tidy formatting).

Common mistakes and quick fixes
  • ValueError when using int(): you typed letters instead of a number. Re-enter the age using digits only.
  • My if statement never runs: your input might be "Small" but you checked "small". Fix by using .lower() on the input.
  • My output looks messy: add a heading and use \n to space lines out.

📤 Submit (Discussion Reply)

Instead of posting screenshots, you will upload your .py file as your submission.

File naming rule: Save your file as:
PetService_FirstnameLastname.py
Example: PetService_AlexNguyen.py
How to upload your .py file in your reply
  1. In Thonny: File → Save as and save your program.
  2. Go back to this discussion and click Reply.
  3. Look for the Attach button (paperclip icon) in the reply box.
  4. Select your .py file and upload it.
  5. In your reply text, write 1 to 2 sentences explaining what your pricing rules were (example: size changes price, service changes price).
Reminder: Your teacher must be able to run your program by opening the .py file. Keep it simple, clean, and easy to understand.