From the course: Computer Science Principles: Programming
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Capture input from the user
From the course: Computer Science Principles: Programming
Capture input from the user
- It is entirely possible to create programs that run on their own with no input from users, but most programs require a user to provide some input, even if it's a simple tap. Capturing input from users can come in many forms, but it generally requires two things. The first is that the app needs to be listening for the user. It needs to know to be on the lookout for the user to do something. It's like shouting in the woods, if no one is there to listen, what you say isn't communicated. With user events like providing input, the same has to happen. User interaction can take many forms. A keyboard is used to enter text and numbers into a program to create new data that is managed by the program. Certain keys or key combinations can initiate certain functions in a program. A mouse is used to point and select items in a graphical user interface. Mouse gestures such as dragging and dropping manipulate objects on the screen. In addition, the path of the mouse can be used to draw and perform…
Contents
-
-
-
-
-
(Locked)
Capture input from the user3m 31s
-
(Locked)
Manage different variable types2m 4s
-
(Locked)
Create conditional tests4m 39s
-
(Locked)
Build compound conditional tests4m 19s
-
(Locked)
Use while loops2m 11s
-
(Locked)
Use for loops3m 11s
-
(Locked)
Create arrays to store groups of values2m 28s
-
(Locked)
Use loops with arrays2m 5s
-
Changing arrays2m
-
(Locked)
-
-
-