Skip to main content
Welcome back. Before we write any code, consider two important questions:
  • What actually is a program?
  • What makes a good program?
Answering these will help you begin to think like a programmer. By the end of this lesson you’ll be able to define what a program is, describe the Input-Process-Output model (IPO), and identify the core qualities of well-written programs.
The image shows a text list describing steps about defining a program, the Input-Process-Output model, and identifying qualities of a good program, alongside an animated cat character and a person speaking.
What is a program? A program is a clear, ordered set of instructions that tells a computer how to perform a task. The computer follows those instructions step by step. A helpful analogy is a recipe: gather ingredients, follow steps in order, and bake for the required time. Example: making a cake — add flour and eggs, mix, and bake for 30 minutes. Follow the steps and you get a cake. Programs work the same way: they take information (input), do something with it (process), and produce a result (output).
The image shows a person in a black shirt with the "KodeKloud" logo speaking, alongside an illustration of a baker decorating a cake with ingredients being poured into a bowl.
Input → Process → Output: the IPO model Every program follows the IPO model. When designing software, explicitly identify:
  • Input — what information the program needs
  • Process — how the program transforms or uses that input
  • Output — what the program should return or display
Here are a few concrete examples organized with the IPO model:
The image shows a person standing next to three smartphone screens displaying a weather app with a gradient background. The app shows a search bar with "Hyderabad," a loading screen, and a weather forecast with sunny conditions.
Design checklist (quick)
When planning a program, ask: What inputs do I need? How will I process them? What output should I produce? Writing these down before coding makes implementation clearer and reduces rework.
What makes a good program?
  1. Correctness
    • The program produces the right result for valid inputs.
    • Test edge cases and typical uses to ensure consistent behavior.
  2. Efficiency
    • Use time and memory wisely. Prefer solutions that solve the problem with minimal, necessary work.
    • Avoid unnecessary repetition; refactor duplicate logic into reusable functions.
  3. Readability
    • Code gets read more than written. Use descriptive names, consistent formatting, and concise comments that explain why a decision was made.
    • Readable code makes collaboration and future maintenance much easier.
  4. Robustness
    • Handle unexpected or invalid inputs gracefully. Provide useful error messages (for example, “Please enter numbers only”) and ways to recover.
Summary table — qualities at a glance: To recap: a program is a step-by-step set of instructions (like a recipe). All programs follow the IPO model: take input, process it, and produce output. A good program is correct, efficient, readable, and robust.
The image shows a person standing in front of three points about programming, discussing step-by-step instructions, the IPO model, and qualities of a good program.
Okay — that’s enough explanation. Let’s write your first program. Links and references

Watch Video