Final answer:
The original pseudocode incorrectly displays the name of individuals under 50, while it should display those over 50. Option 1) is correct by using 'IF(age > 50)' to correctly sieve and display the names of citizens over the age of 50.
Step-by-step explanation:
The mistake in the original pseudocode is that it displays the name of a person who is younger than 50 years old, while the intent is to find and display records of citizens over the age of 50. Therefore, the correct pseudocode should compare the age of the person to 50 and display the name only if the age is greater than 50. Thus, the correct pseudocode is:
FOR EACH person IN citzlist {
age = GetAgeOf(person)
name = GetNameOf(person)
IF(age > 50) {
DISPLAY(name)
}
}
Option 1) is the correct version of pseudocode to achieve this task, as it checks whether the age is greater than 50 and, if so, displays the person's name.The correct pseudocode to find the records of all citizens over the age of 50 is:FOR EACH person IN citzlist {
age = GetAgeOf(person)
name = GetNameOf(person)
IF(age > 50) {
DISPLAY(name)
}
In the given pseudocode, the condition is incorrect as it states 'IF(age < 50)', which would display the names of citizens under the age of 50. To find the records of citizens over the age of 50, the correct condition should be 'IF(age > 50)'.