Please check my answer to a pseudocode CASE statement question This is a pseudocode question in my IGCSE CompSci textbook:


  Use a CASE statement to display the day of the week if the variable DAY has the value 1 to 7 and an error otherwise.


This is my answer to it:

CASE Day OF
    1 : OUTPUT "Monday"
    2 : OUTPUT "Tuesday"
    3 : OUTPUT "Wednesday"
    4 : OUTPUT "Thursday"
    5 : OUTPUT "Friday"
    6 : OUTPUT "Saturday"
    7 : OUTPUT "Sunday"
    OTHERWISE OUTPUT "Day invalid"
ENDCASE


Is this answer correct?

(I realise this is a very rudimentary question for a Year 10/11 CompSci class but I’m homeschooled with no teaching guidance whatsoever. So a big cheers to anyone who would take the time to check my answer for me.)
This problem is about switch-case statements. So, if you can do a pseudo code of such a statement with the case being a DAY variable and the steps are clear, that would be correct.
So, your answer is totally correct and steps are clear. There's no one way of doing pseudo code.

switch(DAY)
  case 1:
    print("Monday")
  case 2:
    print("Tuesday")
  case 3:
    print("Wednesday")
  case 4:
    print("Thursday")
  case 5:
    print("Friday")
  case 6:
    print("Saturday")
  case 7:
    print("Sunday")
  default:
    print("Invalid Day!")


Above is another possible way to a case statement for the DAY variable as your question expects.