Input & Output (Cambridge (CIE) IGCSE Computer Science)

Revision Note

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Input & Output

What is an input?

  • An input is a value that is read from an input device and then processed by a computer program

  • Typical input devices include:

    • Keyboards - Typing text

    • Mice - Selecting item, clicking buttons

    • Sensors - Reading data from sensors such as temperature, pressure or motion

    • Microphone - Capturing audio, speech recognition

  • Without inputs, programs are not useful as they can't interact with the outside world and always produce the same result

  • In programming the keyboard is considered the standard for user input

  • If the command 'INPUT' is executed, a program will wait for the user to type a sequence of characters

  • In other programming languages different command words can be used

Examples

Pseudocode (INPUT <identifier>)

Python

INPUT Name

IF Name ← "James" OR Name ← "Rob" THEN...

name=input("Enter your name: ")

if name == "James" or name == "Rob":

What is an output?

  • An output is a value sent to an output device from a computer program

  • Typical output devices include:

    • Monitor - Displaying text, images or graphics

    • Speaker - Playing audio

    • Printer - Creating physical copies of documents or images

  • In programming the monitor is considered the standard for user output

  • If the command 'OUTPUT' is executed, a program will output to the screen

  • In other programming languages different command words can be used

Examples

Pseudocode (OUTPUT <identifier(s)>)

Python

INPUT Name

IF Name ← "James" OR Name ← "Rob" THEN

OUTPUT "Great names!"

name=input("Enter your name: ")

if name == "James" or name == "Rob":

print("Great names!")

INPUT Name

IF Name ← "James" OR Name ← "Rob" THEN

OUTPUT "Love the name ", Name

name=input("Enter your name: ")

if name == "James" or name == "Rob":

print("Love the name "+name)

Last updated:

You've read 0 of your 10 free revision notes

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Author: James Woodhouse

Expertise: Computer Science

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.