Programming ConceptsLesson 21Free preview
Input and Output
This lesson is part of Intro to Programming · All levels
Summary
This lesson discusses how programs receive input from users and display output. Outputs are generally performed via functions such as print() whereas inputs are read via functions such as input() or scanf(). Since user input is generally text, it is often necessary to convert the type before it is used in computation.
Key points
- The output displays the program results to the screen via print.
- Input read data from a user or external source
- User input is usually text and needs to be converted to numbers
- Clearly separators and prompt enhance user experience
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.