Lesson 11. Interacting with the user
After reading lesson 11, you’ll be able to
- Print values for the user
- Ask the user for input
- Store user input in variables and do operations with it
Many programs are written to do computations behind the scenes, but few of them are useful without some sort of input from a user. One main reason you’d want to write a program is to provide users with a certain experience; that experience relies on a back-and-forth between the user and the program.
Find another person and have a conversation. What kinds of questions can you ask? What responses do you get? Can you build upon a specific response you get?
Answer:
- How are you?
- Good, looking forward to the weekend.
- Me too! Any weekend ...
Get Get Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.