Studyfin Studyfin ✨ Sign up free

Input & output basics

Grade 8 · Coding · Free lesson

Hey there! Ready to learn how programs talk to the world? Let's explore inputs and outputs!

Every computer program needs a way to get information and show results. This is called the input and output process.

banner

An input is information you send to the computer. When you press a key, click a mouse, or speak into a microphone, you are giving the program an input to use.

AInput: Key Pressed

An output is what the computer sends back to you. This could be a sound, a picture on your screen, or text printed out.

Hello, World!Output: Screen Text

To solve problems, we design programs that connect inputs directly to outputs. For example, a smart home light program takes a button press as an input and outputs a bright light.

✏️ Worked example

Explain how to design a simple program that helps a user calculate their age in dog years. Identify the inputs, the processing steps, and the outputs.

  1. First, identify the Input: The program needs to ask the user for their current age in human years as a number.
  2. Second, plan the Process: The program must multiply the human age by 7, because one human year equals seven dog years.
  3. Third, identify the Output: The program must print or display the final calculated number back to the screen.
  4. Finally, check the design: If the user inputs 2, the program calculates 2 times 7 and outputs 14. The design is complete and correct!
calculator
Want the full interactive lesson — quiz, animations, and Finn cheering them on?

More Coding lessons