Test your knowledge with free interactive questions on Seneca — used by over 10 million students.

Input

There must be some mechanism for the user to input data to the computer.

What data can I input?

What data can I input?

  • Data can be input from any device connected to the computer.
  • The keyboard is the most common data input device for command line programs.
  • We will only look at keyboard input in this course.
The input function

The input function

  • Python has a built in function (command) which allows us to take keyboard input.
  • We can use the code: input(“Prompt”) to take the input.
  • We can write any text for the “Prompt”, which will be displayed to the user before they type their response.
Data type of input

Data type of input

  • When data is entered from the keyboard, it is automatically a ‘string’.
  • A string is a sequence of character inputs from the keyboard, for example ‘Hello’.
Jump to other topics
1

Computational Thinking & Algorithms

2

Programming

3

Hardware & Software

4

Data

5

The Internet

6

Online Safety & Security

Practice questions on Input

Can you answer these? Test yourself with free interactive practice on Seneca — used by over 10 million students.

  1. 1
  2. 2
  3. 3
Answer all questions on Input

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium