Avatar ·

How to write a CASE selection operator on Python?

📁 Advanced Python Topics, Help

Solve the problem using Python

The schedule of the doctor's reception hours is given. Display the doctor’s reception hours on a given day of the week.

I wrote it in Pascal, but I can’t translate it to Python.

Program Z10;
var
  N: Integer;
begin
  Readln(n);
  Writeln('Enter the serial number of the day of the week');
  case n of
    1: writeln('Monday 8:00-14:00');
    2: writeln('Tuesday 14:00-20:00');
    3: writeln('Wednesday 8:00-14:00');
    4: writeln('Thursday 14:00-20:00');
    5: writeln('Friday 8:00-14:00');
    6: writeln('Saturday 10:00-16:00');
    7: writeln('Sunday closed');
  end;
end.