COMPUTER PROGRAMMING FUNDAMENTALS
WHAT IS PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which is the correct way to get the user to enter a value when written as pseudocode?
|
input (“Please enter the length”)
|
|
length == input ("Please enter the length")
|
|
length = (“Please enter the length”)
|
|
length = input (“Please enter the length”)
|
Explanation:
Detailed explanation-1: -Variable Assignments Assigning a value to a variable is indicated in pseudocode using an arrow symbol (←). The arrow points from the value being assigned towards the variable it is being assigned to. The following line of pseudocode should be read as ‘a becomes equal to 34’.
Detailed explanation-2: -We can use the INPUT() expression in pseudocode to get input from the user. It works just like a procedure, similar to DISPLAY(), but it doesn’t require any parameters. Instead, when evaluated the INPUT() expression will simply result in whatever input value is provided from the user.
There is 1 question to complete.