Practice Input/Output in CS Thinking
Use these practice problems to test your method after reviewing the concept explanation and worked examples.
Quick Recap
The mechanisms by which a program receives data from the outside world (input) and sends results back (output).
What goes in and what comes out. Keyboard โ program โ screen.
Example 1
easyIdentify the inputs and outputs in this program: name = INPUT('What is your name?'). age = INPUT('How old are you?'). OUTPUT 'Hello ' + name + ', you are ' + age + '.'
Example 2
mediumA temperature converter takes a Celsius value as input and outputs the Fahrenheit equivalent. Write pseudocode and identify the input, process, and output.
Example 3
mediumA program reads a list of 5 test scores and outputs the average. Identify the inputs, process, and output. What type of validation might you add to the input?
Example 4
hardDescribe three different input devices and three different output devices a computer program might use. For each, give an example of a program that uses it.