I need a check on my answers

1) prompt a user to enter an employee name, employee id, and hours worked until a value of "-1" is entered for employye name.
my answer:
Start
Declarations
num EmployId, HrsWrked
string EmployName
housework()
detailLoop()
Stop

housework()
output "Please enter Employee Name"
input EmployName
output "Please enter Employee ID number"
input EmployId
output "Please enter Hours Worked"
input HrsWrked
return

detailLoop()
check if EmployName = -1
while EmployName < > -1
output "Please enter Employee Name"
input EmployName
output "Please enter Employee ID number"
input EmployId
output "Please enter Hours Worked"
input HrsWrked
check if EmployName = -1
endwhile
return

2) If the employee id is not between 1 and 599, continue to prompt the user until a valid employee id is entered.
my answer:
Start
Declarations
num EmployId, HrsWrked
string EmployName
housework()
detailLoop()
Stop

housework()
output "Please enter Employee Name"
input EmployName
output "Please enter Employee ID number"
input EmployId
output "Please enter Hours Worked"
input HrsWrked
return

detailLoop()
check if EmployName = -1
while EmployName < > -1
check if EmployID is >= 1 and <= 599
if EmployID is <1 or > 599
output "Incorrect Employee ID number, Please enter ID value 1- 599"
input EmployId
endif
output "Please enter Employee Name"
input EmployName
output "Please enter Employee ID number"
input EmployId
output "Please enter Hours Worked"
input HrsWrked
check if EmployName = -1

endwhile
return

If I were to code this program, I would start from the user's point of view, namely start appropriate action as soon as possible, such as when an error is discovered.

For the first part, the code is generally correct, but I suggest making change to avoid the following dialog:

Please enter Employee Name
-1
Please enter Employee ID number
123456789
Please enter Hours Worked
0
Goodbye

Once the Employee Name is entered as -1, users expect to either quit the program or see the "goodbye" message.
They would be wondering what's the point of entering EmployeeID and hours worked, which are no longer relevant.

For number 2, it's a similar comment. In addition, the entry of EmployeeID can be modified to let the user immediately correct the ID right after he entered an invalid one, such as:

output "Please enter Employee ID number"
input EmployId
while EmployID is <1 or > 599
output "Incorrect Employee ID number, Please enter ID value 1- 599"
input EmployId
endwhile

This will take care of the problem on the spot.

Otherwise, the pseudocode looks quite logical.

Your approach to solve these problems is correct. However, please keep in mind that we are dealing with programming logic, so there are a few tweaks needed in your solution to make it work properly:

1) Prompt a user to enter an employee name, employee id, and hours worked until a value of "-1" is entered for the employee name:

```plaintext
Start
Declarations
num EmployId, HrsWrked
string EmployName
housework()
detailLoop()
Stop

housework()
output "Please enter Employee Name"
input EmployName
if EmployName = "-1"
return
endif
output "Please enter Employee ID number"
input EmployId
output "Please enter Hours Worked"
input HrsWrked
return

detailLoop()
call housework()
return
```

In this solution, the `housework()` function is called inside the `detailLoop()` function to prompt the user continuously until they enter "-1" as the employee name.

2) If the employee id is not between 1 and 599, continue to prompt the user until a valid employee id is entered:

```plaintext
Start
Declarations
num EmployId, HrsWrked
string EmployName
housework()
detailLoop()
Stop

housework()
output "Please enter Employee Name"
input EmployName
output "Please enter Employee ID number"
input EmployId
if EmployId < 1 or EmployId > 599
repeat
output "Incorrect Employee ID number. Please enter an ID value between 1 and 599"
input EmployId
until EmployId >= 1 and EmployId <= 599
endif
output "Please enter Hours Worked"
input HrsWrked
return

detailLoop()
call housework()
return
```

In this solution, after the user enters the employee ID, we check if it is outside the range of 1 to 599. If it is, we output an error message and prompt the user to enter a valid employee ID until they provide one within the specified range.

Overall, your understanding and implementation of the logic are correct, and these tweaks will ensure the program functions as intended.