Page 419 - ComputerScience_Class_11
P. 419

The above code automatically changes the data type based on the value.
                     Output

                    Hello




                 12.5.5 Large Community Support
                 Python has a very large and active community of users and developers around the world. This means that if someone
                 faces a problem while using Python, help is easily available. Many programmers share tutorials, solutions and free
                 learning materials online. Because of this strong community support, beginners can learn Python faster and solve
                 problems easily.
                 Certain features of Python help beginners learn and code easily:
                 •  Getting help online: If a beginner finds an error in a Python program, they can search the error message on the
                   internet. Websites like Stack Overflow, GitHub and Python forums usually provide simple answers and solutions
                   shared by other users.
                 •  Learning resources: There are many free Python tutorials, videos and documentation available. A student can easily
                   find examples and explanations for topics like loops, functions or libraries, making learning Python easier.

                 12.5.6 Portable
                 Python is a portable programming language. This means a Python program written on one operating system can run
                 on other operating systems without changing the code. Because Python is a high-level and interpreted language, the
                 same program can be used on Linux, Windows, macOS and UNIX. Python also allows developers to create graphical
                 user interface (GUI) programs that work on different systems.

                 For example, to run a Python program on different operating systems, the same script written on Windows can also
                 work on Linux or macOS.

                     print("Python is portable")
                 12.5.7 Platform Independent
                 Python is a platform-independent programming language. This means a program written in Python on one operating
                 system can run on another without making any changes. Python code is not directly converted into machine code;
                 instead, it is executed by the Python interpreter. The interpreter is available for various platforms such as Windows,
                 Linux,  macOS and UNIX.  Therefore,  the  same  Python  program  can run on any  system  where  Python  is installed.
                 For example, to display the output in different operating systems:
                 •  On Window:
                    print("Python works on all platforms")
                 •  On Linux:
                    print("Python works on all platforms")
                 •  On macOS:
                    print("Python works on all platforms")
                 Whether you run this on Windows, Linux or macOS, the output will be the same.

                 Output:
                 Python works on all platforms

                 12.5.8 Interpreter-Based Language
                 Python is an interpreter-based programming language. This means Python code is executed line by line by the Python
                 interpreter. The interpreter reads one line of code, translates it and executes it immediately. Unlike compiled languages,
                 Python source code is first compiled into bytecode, which is then executed by the Python Virtual Machine (PVM).
                 Because of this, errors are shown as soon as they occur, which makes debugging easier for beginners.



                                                               Installation & IDE and Fundamentals of Python Programming  417
   414   415   416   417   418   419   420   421   422   423   424