Stage 2 : INPUT
Reading: Read content other than video.
In the input stage of programming, the declaration of variables precedes the acquisition of user input.
Variables are declared to reserve memory space for storing the data that will be provided by the user.
This declaration informs the program about the type and name of the variable that will hold the input data. Once the variables are declared, the program prompts the user with a message, typically indicating the type of input expected or providing instructions.
Following the prompt, the program waits for the user to input data, which is then captured using an input function or similar mechanism.
This input is then assigned to the corresponding variables declared earlier, allowing the program to utilize the user-provided data in subsequent stages of execution.
Proper declaration and handling of variables during the input stage ensure that the program can effectively interact with users and process the input data as intended.
Follow these examples
Example 1:
DECLARE PRODUCTNAME : STRING
OUTPUT “ENTER PRODUCT NAME : “
INPUT PRODUCTNAME
Example 2 :
DECLARE PRODUCTQTY : STRING
OUTPUT “ENTER PRODUCT QTY : “
INPUT PRODUCTQTY
Apply Code in Pseudocode Editor Given Below
Instructions:
- Press the Maximize button to change it to full screen.
- Delete sample code file from right side
- Create new file with name of Qno1 and start writing Pseudocode
- Construct all the questions given in the interactive book.
- “<-” use it to put arrows in for the assignment.
- There are three areas: “files”, “editor”, “Console”
Press the “Mark as Complete” button to finish the lecture.
