Zed-King Institute
    All Notes

    O Level · Chapterwise Notes

    Chapter 3: Introduction to Python

    Zed-King Study app · Free

    O Level students across India practise here, free

    Daily M1–M4 quizFull 100-question mocksAll-India rank
    Open the free app

    Google login · no Play Store needed

    🏆 Free All-India Sunday Mock · Sun, 29 Nov, 11 AM · CCC + O LevelRegister

    About this PDF

    M3 Chapter 3 notes — getting started with Python: installing it, the interpreter and IDLE, variables and data types, input and output, comments and indentation.

    This is part of the free O Level M3-R5.1 study material in the Zed-King Study Zone. You can read every page above in your browser, or download the file and study offline. Zed-King Group of Institute is a NIELIT Study Centre in Kaithal, Haryana, and all of this material follows the current NIELIT syllabus.

    Course
    O Level — NIELIT Foundation Diploma
    Module
    M3 — M3-R5.1: Programming and Problem Solving through Python
    Section
    Chapterwise Notes
    Format
    PDF — read online or download
    Price
    Free, no sign-up required

    Text from this PDF

    The opening pages as plain text — open the reader above for tables, diagrams and the full file.

    O-LEVEL (M3-R5.1)

    Python Programming By Mrs. Geeta Python Instructor Zed-King Group of Institutions Kaithal Python Programming Video Tutorial O-LEVEL (M3-R5.1) Full Video Playlist Available on YouTube Channel Zed- king Computer Institute Kaithal Free Online Computer Classes On YouTube Channel https://www.youtube.com/@zedkinginstitute For Free PDF Notes Our Telegram Channel t.me/boost/Zedking_Institute INTRODUCTION TO PYTHON

    CHAPTER-3 History of Python laid its foundation in the late 1980s.

    implementation of python was started in December 1989 by Guido Van Rossum at CWI(centrum Wiskunde & Informatica) in Netherland.

    was developed by Guido Van Rossum in 1991 at National Research Institute for mathematics and computer science in the Netherland and officially released on February In 1994, Python 1.0 was released with new features like lambda, map, filter, and reduce.

    latest version of Python 3.13.2 (4-Feb-2025)

    What is Python?

    Python is a general-purpose, dynamically typed, high-level, compiled and interpreted, garbage-collected, and purely object-oriented programming language that supports procedural, object-oriented, and functional programming. It is case-sensitive.

    Application of python development and numeric computing processing programming science learning development Introduction To Python Interpreter And Program Execution Python interpreter is a program that executes other python programs.A python program contains source code(ex: a.py) and this code first compiled by python compiler to produce byte code, which creates file with extensions .pyc (ex:a.pyc). The

    byte code compilation happened internally and completely hidden from developer .

    This byte code is given to Python Virtual Machine which converts the byte code to machine code. This machine code is run by processor and finally the results are produced.

    PVM is software that contains an interpreter that converts the byte code to into machine code. PVM is most often called Python Interpreter. PVM contains a complier in addition to the Interpreter. This Compiler is called Just In Time (JIT) compiler which is useful to speed up execution of the python program.

    a.py (source code)

    a.pyc (bytecode)

    (machine code)

    Monitor How to use python?

    Once installed, the python console can be accessed in several ways. Python is considered an interpreted language because Python programs are executed by an interpreted . There are two ways to use the interpreter.

    1.Interactive mode(Command-line)-Python Shell

    2.Script mode-(Intergrated Development Environment- IDLE)

    Using Comment Comments can be used to explain Python code. It can be used to make the code more readable. Comment in Python begin with a hash mark (#) and white space character and continue to the end of line.

    # this is a comment Python multiline comment:

    Python does not really have a syntax for multiline comments,you can create multiline comments in python. There are two simple ways to do so.

    1. In the firstway, you can insert a # for each line:

    # this is comment

    2. Another thing you can do is use multiline strings by wrapping your comment inside a set of triple quotes:

    “”” if I really hate pressing enter and Typing all those hash marks , I could just do this instead What is variable?

    A variable is a name which is used to refer memory location and used to hold value . In python, variable also called as an identifier . A variable can have a short name(like x) or a more descriptive name(carname).

    for declaring python variables:

    A variable name must start with a letter or the underscore character.

    A variable name cannot start with a number.

    A variable name can only contain alpha-numeric characters and underscores(A-z,0-9,_).

    Variables name are case-sensitive(age , Age and AGE are three different variables).

    We can’t use reserved words as variables.

    There is no length limit for a variable.

    What is keywords/Reserved words.

    Python keywords are special reserved words which convey a special meaning to the compiler/interpreter.

    are contains only alphabet symbols.

    the following three keywords all other contains only lower case alphabet symbols.

    True , False , None concept not there in the python.

    while loop is not there in the python.

    , float data types are not required in python to declare a variable. That’s why not available in python keywords list.

    Keyword list:

    More chapterwise notes for M3-R5.1

    Run these Python programs yourself — free

    Reading code is not the same as writing it. Type any program from these notes into our free online Python compiler (real Python 3 with NumPy, input() works), or study one of the explained programs with its output.

    Prepare for O Level with expert guidance

    Classroom training, practical labs and exam registration at Zed-King Institute, Kaithal.

    Drag me!