class_11cs_unit2_Computational_Thinking_and_Programming_–_1_Part (4)
class_11cs_unit2_Computational_Thinking_and_Programming_–_1_Part (4)
Introduction to Python
What is Python?
• Python is a popular programming language. It was created by Guido
van Rossum and released in 1991.
• It is used for web development (server-side),software development,
mathematics, system scripting.
Python Install
You can download it for free from
the following
website: https://www.python.org/
A sample screen of Python interpreter is
shown the symbol >>> is the Python
prompt, which indicates that the
interpreter is ready to take instructions
Execution Modes SUBSCRIBE HAMARI ACADEMY ON YOUTUBE
1. Interactive mode
• To work in the interactive mode, we can simply type a Python
statement on the >>> prompt directly. As soon as we press enter, the
interpreter executes the statement and displays the result(s)
• Working in the interactive mode is convenient for testing a single
line code for instant execution.
• In the interactive mode, we cannot save the statements for future
use.
• we have to retype the statements to run them again.
Execution Modes SUBSCRIBE HAMARI ACADEMY ON YOUTUBE
2. Script mode
• In the script mode, we write a Python program in a file, save it and then use
the interpreter to execute it.
• Python scripts are saved as files where file name has extension “.py”.
• By default, the Python scripts are saved in the Python installation folder.