• Home /Exam Details (QP Included)>Main Exam>Optional Subject-Medical Group>Computer Science / Computer Science Notes On – Python Programming – For W.B.C.S. Examination.
  • Computer Science Notes On – Python Programming – For W.B.C.S. Examination.

    Python is a high-level scripting language which can be used for a wide variety of text processing, system administration and internet-related tasks.Continue Reading Computer Science Notes On – Python Programming – For W.B.C.S. Examination.

    Unlikemany similar languages, it’s core language is very small and easy to master, while allowing the addition of modules to perform a virtually limitless
    variety of tasks. Python is a true object-oriented language, and is available
    on a wide variety of platforms.

    There’s even a python interpreter written
    entirely in Java, further enhancing python’s position as an excellent solution for internet-based problems.

    Python was developed in the early 1990’s by Guido van Rossum, then
    at CWI in Amsterdam, and currently at CNRI in Virginia. In some ways,
    python grew out of a project to design a computer language which would be
    easy for beginners to learn, yet would be powerful enough for even advancedusers. This heritage is reflected in python’s small, clean syntax and the thoroughness of the implementation of ideas like object-oriented programming,without eliminating the ability to program in a more traditional style. Sopython is an excellent choice as a first programming language without sacrificing the power and advanced capabilities that users will eventually need.

    Although pictures of snakes often appear on python books and websites,
    the name is derived from Guido van Rossum’s favorite TV show, “Monty
    Python’s Flying Circus”. For this reason, lots of online and print documentation for the language has a light and humorous touch. Interestingly, manyexperienced programmers report that python has brought back a lot of thefun they used to have programming, so van Rossum’s inspiration may be wellexpressed in the language itself.

    There are a few features of python which are different than other programming languages, and which should be mentioned early on so that subsequent examples don’t seem confusing. Further information on all of these featureswill be provided later, when the topics are covered in depth.
    Python statements do not need to end with a special character – the
    python interpreter knows that you are done with an individual statement
    by the presence of a newline, which will be generated when you press the
    “Return” key of your keyboard. If a statement spans more than one line, the
    safest course of action is to use a backslash (\) at the end of the line to let
    python know that you are going to continue the statement on the next line;
    you can continue using backslashes on additional continuation lines.

    Python provides you with a certain level of freedom when composing a
    program, but there are some rules which must always be obeyed. One of these rules, which some people find very surprising, is that python uses indentation (that is, the amount of white space before the statement itself) to indicate the presence of loops, instead of using delimiters like curly braces ({}) or keywords (like “begin” and “end”) as in many other languages. The amount of indentation you use is not important, but it must be consistentwithin a given depth of a loop, and statements which are not indented must
    begin in the first column. Most python programmers prefer to use an editor like emacs, which automatically provides consistent indentation; you will
    probably find it easier to maintain your programs if you use consistent indentation in every loop, at all depths, and an intelligent editor is very useful in achieving this.

    Python is a cross-platform programming language, which means that it can run on multiple platforms like Windows, macOS, Linux, and has even been ported to the Java and .NET virtual machines. It is free and open-source.

    The Easiest Way to Run Python

    The easiest way to run Python is by using Thonny IDE.

    The Thonny IDE comes with the latest version of Python bundled in it. So you don’t have to install Python separately.

    Follow the following steps to run Python on your computer.

    1. Download Thonny IDE.
    2. Run the installer to install Thonny on your computer.
    3. Go to: File > New. Then save the file with .py extension. For example, hello.pyexample.py, etc.
      You can give any name to the file. However, the file name should end with .py
    4. Write Python code in the file and save it.

    Please subscribe here to get all future updates on this post/page/category/website

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

     WBCS Foundation Course Classroom Online 2024 2025 WBCS Preliminary Exam Mock Test WBCS Main Exam Mock Test WBCS Main Language Bengali English Nepali Hindi Descriptive Paper