Python-features

Python- Facts
             

The above images are from the textbook and discussion today is based on them. 
Feel free to download and save for reference

By the end of this session, you will be able to understand the important features of Python Programing Language.

Please ensure that you copy the content shared on the blog in your registers.
____________________________________________________________

Before we take up the key features of Python, lets first see why should we study Python!


(URL of the above video, incase you can't view: https://youtu.be/Y8Tko2YC5hA)

So, without much ado, lets embark on the journey to explore PYTHON...

---------------------------------------------------------------------------------------------
Let us take a review of the key features of Python discussed in the last class:
  1. Simple-
  •  Written in simple English statements.
  •  Therefore, it is easy to understand the syntax( way of writing) and develop programs.
2. Easy to learn- 
  • uses very few keywords (set of special words which have a specific meaning).
  • structure of program is very simple and easy to create. 
          
At this point, it is imperative to highlight the following terms:

1. Source code is a program written in a programming language (or in assembly language).

2. Machine code is the directly executable binary representation of a computer program.The CPU can directly execute this code.


3. Byte code is artificial machine code for a virtual machine or VM, such as the Java VM or the Python VM( PVM). It is intermediate code between source code and machine code that is executed by a so called virtual machineSource code is code written according to a programming language specification, could be compiled or interpreted, and can be executed.

4. Object code is the result of compilation of a module or program written in a programming language, stored for later use.

__________________________________________________
Let us move ahead with the key features of Python, which is our discussion for today.
(All of you are expected to note the following in your registers:)

3. Platform Independent and portable-
  • Can run on any platform (Operating System/hardware)
  • Code created on Windows machine can run it on Mac or Linux ( other common Operating systems).
  • Bytocode is generated by Python compiler
  • Bytecode represents a fixed set of instructions that run on all Operating Systems and hardware using the PVM (Python Virtual Machine).
4. Open Source-
  • Python is available for free 
  • Can be downloaded from www.python.org website.
  • Its source can be read and modified by the user ,that is how it gets the name "Open Source" (code).
5. Dynamically typed-
  • In Python, there is no need to declare anything.
  • An assignment statement ( eg a=b+c), binds the name of the object, which can be of any type.
  • It can be changed to a different type ,anytime.
  •  There is no need to define the type(int or float) of the variable.
6. Huge Library-
  • It has large inbuilt library (collection) 
  • It contains pre-built and portable functionality, known as standard library
  • It makes the program building process easy and fast, as pre-built modules are available which can be easily included by a programer in his program.
7. Procedure and Object Oriented-
  • Is Object oriented.- Object-oriented Programming(OOP) is a programming language that uses classes and objects to create models based on the real world environment. In OOPs it makes it easy to maintain and modify existing code as new objects are created inheriting characteristics from existing ones.
  • Is Procedure oriented- On other hand Procedural Oriented Programming is a programming language that follows a step-by-step approach to break down a task into a collection of variables and routines (or subroutines) through a sequence of instructions. Each step is carried out in order in a systematic manner so that a computer can understand what to do.
  •   Python file extension is .py
  • Bytecode file extension is .pyc
  • Python is referred to as "interpreted language"- 
    • compiler converts the .py bytecode for the PVM
    • An interpreter executes this bytecode on the Virtual Machine.
EXERCISE
Q1 What do you mean by "Platform Independent"? 
Q2. How is Python portable?
Q3. Why is Python called "Open Source"? Name a few other Open source software that you are aware of.
Q4. How is Python "Dynamic"?
Q5. What is standard library? How does it help?
Q6.  Why is Python referred to as interpreted language? Support the explanation with a well labelled diagram.
Q7. Differentiate between ".py" and ".pyc".

Comments

  1. Good Morning Ma'am
    Kavyansh Bagotra 9D

    ReplyDelete
  2. Good morning ma'am! I am Arjav Jain from 9D

    ReplyDelete
  3. good morning mam i am aryan mahehswari

    ReplyDelete
  4. Good morning ma'am I am Waqar of class 9-D

    ReplyDelete
  5. Good Morning Ma'am
    This is Joshua Walter of Class 9-D.

    ReplyDelete
  6. Good Morning ma'am I am soumil Arora

    ReplyDelete
  7. Good morning boys. In the coming few sessions we may be using google meet based sessions where I will send you a meeting ID on the blog.
    You need to install/ connect to Google meet application. Kindly make the necessary arrangements.

    ReplyDelete
  8. Good morning maam i am samaksh goswami of class 9D

    ReplyDelete
  9. Good morning ma'am.samarth raj 9D

    ReplyDelete
  10. Good morning Ma’am.
    My name is Ryan Rahuel Valentine from Class 9D.

    ReplyDelete
  11. Good morning ma'am this is Vincent Zacharias

    ReplyDelete
  12. Good morning mam I am Kritik Kuraria

    ReplyDelete
  13. Good morning maam I am Satwik Pruthi of class 9D

    ReplyDelete
  14. Good morning ma'am.
    My name is Ojas Khanna

    ReplyDelete
  15. Good Moring Maam this is Aryan Joseph

    ReplyDelete
  16. Good Morning Ma'am .My name is Advait Mohanty of class 9D.

    ReplyDelete
  17. Good morning ma'am.
    Sarhan Akhtar 9D.

    ReplyDelete
  18. Good morning ma'am I am vansh bharti of class 9D

    ReplyDelete
  19. Good Morning Mam. I am
    Abhishek Dial 9 D

    ReplyDelete
  20. All boys to note the following steps and be ready for Google meet sessions--
    Steps to join the Google Meet:
    1. In a web browser, enter https://meet.google.com.
    2. Click Join meeting.
    • Enter a meeting code .
    • The meeting code is the string of letters at the end of the meeting link. You don't have to enter the hyphens.
    3. Click Continue and then Join now.

    ReplyDelete
  21. Good Morning Mam I am Derick Joseph of 9D

    ReplyDelete
  22. Is there any doubt or confusion? Pls share

    ReplyDelete
  23. Good Morning ma'am
    I am Mohnish Kansal 9D

    ReplyDelete
    Replies
    1. Mohnish the class is about to end and you are joining now. I am sorry. In future, i wont give attendance

      Delete
  24. Good Morning Ma'am I am Karan Kapoor of class 9-D

    ReplyDelete
  25. Karan the class is about to end and you are joining now. I am sorry. In future, i wont give attendance

    ReplyDelete
  26. Good Morning ma'am.I am Gracious Benny of class9-D

    ReplyDelete
  27. Good morning mam I am Ibrahim khan of 9D

    ReplyDelete

Post a Comment

Popular posts from this blog

Introduction

Python-Modes