ExamGecko
Question list
Search
Search

Question 316 - FC0-U61 discussion

Report
Export

A developer is writing a program to process a long list of employees and apply a cost-of-living increase of 3.2% to all employees making less than $15 per hour. Which of the following pseudocode snippets provides the best solution?

A.
If employeesalary is greater than $15 per hour employeesalary = employeesalary * 1.032
Answers
A.
If employeesalary is greater than $15 per hour employeesalary = employeesalary * 1.032
B.
For all employees in the list making less than $15 per hour employeesalary = employeesalary * 1.032
Answers
B.
For all employees in the list making less than $15 per hour employeesalary = employeesalary * 1.032
C.
If employeesalary is less than $15 per hour employeesalary = employeesalary * 3.2
Answers
C.
If employeesalary is less than $15 per hour employeesalary = employeesalary * 3.2
D.
For all employees in the list making greater than $15 per hour employeesalary = employeesalary * 3.2
Answers
D.
For all employees in the list making greater than $15 per hour employeesalary = employeesalary * 3.2
Suggested answer: B

Explanation:

This pseudocode snippet correctly implements the requirement to apply a cost-of-living increase to employees making less than $15 per hour. By using a loop (For all employees in the list), it ensures that every employee meeting the condition (making less than $15 per hour) will have their salary adjusted by multiplying it by 1.032. This approach efficiently processes each relevant entry just once and applies the necessary increase accurately.

asked 02/10/2024
Ishan Patel
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first