1. If the following pseudocode were an actual program, why would it not display the output that the programmer expects? Declare String favoriteFood Display "What is the name of your favorite food?" Input favoriteFood Display "Your favorite food is " Display "favoriteFood" 2. If the programmer translates the following pseudocode to an actual programming language, a syntax error is likely to occur. Can you find the error? Declare String 1stPrize Display "Enter the award for first prize." Input 1stPrize Display "The first prize winner will receive ", 1stPrize 3. The following code will not display the results expected by the programmer. Can you find the error? Declare Real lowest, highest, average Display "Enter the lowest score." Input lowest Display "Enter the highest score." Input highest Set average = low + high / 2 Display "The average is ", average, "." 4. Find the error in the following pseudocode. Display "Enter the length of the room." Input length Declare Integer length 5. Find the error in the following pseudocode. Declare Real pi Set 3.14159265 = pi Display "The value of pi is ", pi
1. If the following pseudocode were an actual program, why would it not display the output that the programmer expects?
Declare String favoriteFood
Display "What is the name of your favorite food?"
Input favoriteFood
Display "Your favorite food is "
Display "favoriteFood"
2. If the programmer translates the following pseudocode to an actual programming language, a syntax error is likely to occur. Can you find the error?
Declare String 1stPrize
Display "Enter the award for first prize." Input 1stPrize
Display "The first prize winner will receive ", 1stPrize
3. The following code will not display the results expected by the programmer. Can you find the error?
Declare Real lowest, highest, average
Display "Enter the lowest score."
Input lowest
Display "Enter the highest score."
Input highest
Set average = low + high / 2
Display "The average is ", average, "."
4. Find the error in the following pseudocode.
Display "Enter the length of the room."
Input length
Declare Integer length
5. Find the error in the following pseudocode.
Declare Real pi
Set 3.14159265 = pi
Display "The value of pi is ", pi
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images