Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Python programming., Lecture notes of Programming Languages

In this ppt mainly focus on basics of python .

Typology: Lecture notes

2020/2021

Available from 07/05/2021

jishnusai-machiraju
jishnusai-machiraju 🇮🇳

4

(1)

6 documents

1 / 69

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Python
Programmin
g Language
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45

Partial preview of the text

Download Python programming. and more Lecture notes Programming Languages in PDF only on Docsity!

Python

Programmin

g Language

Python is the future of AI and Machine Learning.

  • (^) Python numerical computation engines such as NumPy and SciPy, allowing complex calculations to be done by a single “import” statement followed by a function call.
  • (^) Given the flexibility of the language, its speed, and the machine learning functionality delivered by libraries such as scikit-learn, Keras, and TensorFlow, we’ll continue to see Python dominate the machine learning landscape.

Introduction

  • (^) Python interpreters are available for many operating systems.
  • (^) Like Java, once written, programs can be run on any operating system.
  • (^) Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non scripting contexts.
  • (^) It has automatic memory management(Garbage collection)

History

  • (^) The history of Python starts with ABC.
  • (^) Python was conceptualized by Guido Van Rossum in the late 1980s.
  • (^) It was in late 1980’s, when Guido van Rossum came up with an idea to develop a programming language while working in CWI(Centrum Wiskunde and Informatica), Amsterdam, for a project named Amoeba which is a distributed operating system.
  • (^) ABC is a general-purpose programming language and programming environment, which had been developed in the Netherlands, Amsterdam, at the CWI (Centrum Wiskunde & Informatica).

Features of Python Easy to Read, Learn and Use(Readability):

  • (^) Python does not involve the use of complex syntaxes which makes it a highly readable language.
  • (^) Python's syntax is clear and readable.
  • (^) It is also very easy language to learn and use in web development and GUI- based applications. Interpreted Language-
  • (^) Python is an interpreted language.
  • (^) It means you don’t need to compile your codes to execute the program.
  • (^) Following is a list of Python Interpreters.
    • (^) CPython
    • (^) PyPy
    • (^) Stackless Python

Cont .. Interactive Language-

  • (^) Python is an interactive language, which means you can write your programs in Python prompt thus enabling you to interact with the interpreter. Portable-
  • (^) Since a python program has the ability to run on all platforms such as Windows, MacOS, Linux etc., thus making it a highly portable language.
  • (^) It can run on various hardware platforms and has the same interface on all platforms.

Cont .. Cross-Compilation-

  • (^) You can actually use python codes in other languages by means of several compilers that are listed below. - (^) Jython- compiles Python code to Java Bytecode - (^) Pyjs- compiles Python code to JavaScript - (^) Cython- compiles Python code to C and C++ - (^) Pythran- compiles Python code to C++ - (^) IronPython- it is used to run Python programs on .NET Framework.

Embeddable-

  • (^) You can embed Python within your C/C++ program to give scripting capabilities for your program's users.

Cont .. Object Oriented-

  • (^) Python supports procedure-oriented programming as well as object- oriented programming.
  • (^) In procedure-oriented languages, the program is built around procedures or functions which are nothing but reusable pieces of programs.
  • (^) In object-oriented languages, the program is built around objects which combine data and functionality. Extensible-
  • (^) If you need a critical piece of code to run very fast, you can achieve this by writing that piece of code in C, and then combine that with your Python program.

Comments in python Single line comments:

  • (^) # This would be a comment in Python