Avatar ·

How to write a case selection statement in Python?

📁 Advanced Python Topics, Help

Solve the problem using Python

Given a doctor's office hours schedule. Display the doctor's office hours for 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 ordinal 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:                    
Avatar ·

A very significant advantage of C# (and .NET along with it) lies in the fact that Microsoft has built a very extensive and large ecosystem around it, in which you can survive quite well by being a specialist only in technologies developed by Microsoft. The same C#, as correctly noted above, allows you to write for desktop (and Windows, by the way, is 90% of the market), for web, and for mobile platforms (although here, of course, everything is vague and shaky - there is no confidence in the bright future of Windows Phone and its ilk). Actually, by ecosystem I meant not only languages, frameworks, SDKs, huge class libraries for all occasions, DBMS, and development environment, but also comprehensive documentation systems, MSDN, various video portals like TechDays. All of this has been around for quite a while.

Log in to leave an answer

Blogs