0% found this document useful (0 votes)
14 views4 pages

Introduction to Core Python Basics

Python is a simple yet powerful programming language that can be used for a wide range of applications. It was created in the late 1980s and its development is still ongoing with new versions released regularly. Python supports both procedural and object-oriented programming and has a large standard library. It is an interpreted language, which means code can be executed without compilation. Python code is also portable across different platforms.

Uploaded by

76yycn65
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Introduction to Core Python Basics

Python is a simple yet powerful programming language that can be used for a wide range of applications. It was created in the late 1980s and its development is still ongoing with new versions released regularly. Python supports both procedural and object-oriented programming and has a large standard library. It is an interpreted language, which means code can be executed without compilation. Python code is also portable across different platforms.

Uploaded by

76yycn65
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Core Python

Python History
✓ Python laid its foundation in the late 1980s.
✓ The implementation of Python was started in the December 1989 by Guido Van
Rossum.
✓ In February 1991, van Rossum published the code.

Python Introduction:
"Python is a programming language that lets our work more quickly and integrates our
systems more effectively."

Python is a general purpose, dynamic, high level and interpreted programming language. It
supports Object Oriented programming approach to develop applications.

Python is easy to learn yet powerful and versatile scripting language which makes it attractive
for Application Development.

Python's syntax and dynamic typing with its interpreted nature, makes it an ideal language
for scripting and rapid application development.

Python supports multiple programming pattern, including object oriented, imperative and
functional or procedural programming styles.

Python makes the development and debugging fast because there is no compilation step
included in python development and edit-test-debug cycle is very fast.

Why the name Python?


No. It wasn't named after a dangerous snake. Rossum was fan of a comedy series from late
seventies. The name "Python" was adopted from the same series "Monty Python's Flying
Circus". Python was named for the BBC TV show Monty Python's Flying Circus.

Python is derived from:


✓ Functional Programming from C Language
✓ OOP from C++
✓ Scripting language features from Perl and Shell script
✓ Modular programming features from Modula-3
✓ Syntaxes from C and ABC languages

Where we can use Python:


Python is known for its general-purpose nature that makes it applicable in almost each
domain of software development.
✓ Desktop Applications.
✓ Web applications (DJango*, TurboGears, web2py, Flask,…)
✓ Database Applications* (SQL)
✓ Networking Applications
✓ Games

Sai vardhan Cell: 7893570611


Core Python
✓ Data Analysis
✓ Machine Learning
✓ AI
✓ IoT

Which companies used Python?


✓ Google
✓ Youtube
✓ Dropbox
✓ NASA

Features of Python:
1. Simple and easy to learn:
✓ Python is a simple programming language. When we read Python program, we can
feel like reading English statements.
✓ The syntaxes are very simple and only 35 (up to 3.7v) keywords are available.
✓ When compared with other languages, we can write programs with very a smaller
number of lines. Hence more readability and simplicity.
✓ We can reduce development and cost of the project.

2. Freeware and Open Source:


✓ We can use Python software without any license and it is freeware.
✓ Its source code is open, so that we can we can customize based on our requirement.
Example: Jython is customized version of Python to work with Java Applications.

3. High Level Programming language:


✓ Python is high level programming language and hence it is programmer friendly
language.
✓ Being a programmer, we are not required to concentrate low level activities like
memory management and security etc.
4. Platform Independent:
✓ Once we write a Python program, it can run on any platform without rewriting once
again.
✓ Internally PVM is responsible to convert into machine understandable form.

5. Portability:
✓ Python programs are portable. ie we can migrate from one platform to another
platform very easily. Python programs will provide same results on any platform.

6. Dynamically Typed:
✓ In Python we are not required to declare type for variables. Whenever we are
assigning the value, based on value, type will be allocated automatically. Hence
Python is considered as dynamically typed language.
✓ But Java, C etc. are Statically Typed Languages because we have to provide type at the
beginning only.
✓ This dynamic typing nature will provide more flexibility to the programmer.

Sai vardhan Cell: 7893570611


Core Python

7. Both Procedure Oriented and Object Oriented:


✓ Python language supports both Procedure oriented (like C, pascal etc.,) and object
oriented (like C++, Java) features. Hence, we can get benefits of both like security and
reusability etc.

8. Interpreted:
✓ We are not required to compile Python programs explicitly. Internally Python
interpreter will take care that compilation.
✓ If compilation fails interpreter raised syntax errors. Once compilation success then
PVM (Python Virtual Machine) is responsible to execute.

9. Extensible:
✓ We can use other language programs in Python.
✓ The main advantages of this approach are:
o We can use already existing legacy non-Python code
o We can improve performance of the application

10. Embedded:
✓ We can use Python programs in any other language programs. i.e. we can embed
Python programs anywhere.

11. Extensive Library:


✓ Python has a rich inbuilt library.
✓ Being a programmer, we can use this library directly and we are not responsible to
implement the functionality.

Limitations of Python:
✓ Performance wise not up to the mark because it is interpreted language.
✓ Not using for mobile Applications

Different flavors of Python


1) Cpython: The base of all these implementations is Cpython or more formally known as
python. It is written in C and is a bytecode interpreter. Our bytecode is executed on CPython
Virtual Machine.

2) Jython: Jython, is an implementation of the Python programming language which is


designed to run on the Java Platform. It has compiler which compiles our python code into
Java bytecode.

3) IronPython: IronPython is another implementation of the Python targeting the .NET


Framework. It is entirely written in C# and runs on .NET virtual machine (That is nothing but
CLR (Common Language Runtime)). Again we can import C# classes into IronPython.

4) Pypy: Pypy is actually bit different than other implementations its primary focus is to
overcome drawbacks (so called) of python. It is a Python interpreter and just-in-time
compiler. It is written in Python itself.

Sai vardhan Cell: 7893570611


Core Python
5) RubyPython: A bridge between the Ruby and Python interpreters. It embeds a running
Python interpreter in the Ruby applications.

6) Anaconda Python: Anaconda is a free and open source distribution of the Python and R
programming languages for data science and machine learning related applications that aims
to simplify package management and deployment.

7) Stackless Python: Stackless Python is a reimplementation of traditional python and its key
point is lightweight threading. We can say its branch of CPython supporting micro threads.

Python Version
Python programming language is being updated regularly with new features and supports.
There are lots of updating in python versions, started from 1994 to current release.

Python Versions:
Python 1.0 January 1994
Python 2.0 October 2000 (support up to 2020)
Python 3.0 December 2008

Note: Any new version should provide support for old version programs in Software
programming languages. But not in allowed Python.

Sai vardhan Cell: 7893570611

Common questions

Powered by AI

Python's platform-independent nature allows programs written in Python to run on any operating system without modification. This ease of portability encourages developers to adopt Python, as it reduces the complexity and costs associated with developing and maintaining applications across multiple platforms. By abstracting the underlying platform details, Python supports rapid development and seamless deployment, contributing significantly to its widespread popularity .

Jython allows Python programs to run on the Java platform, enabling seamless integration with Java libraries and applications. IronPython targets the .NET framework, providing interoperability with C# and the .NET ecosystem. PyPy aims to enhance performance through just-in-time compilation and serves as an experimental platform for exploring Python's efficiency. Each implementation caters to specific environments or use cases, widening Python's applicability and accelerating its adoption across different domains .

Python's support for both object-oriented and procedural paradigms allows developers to choose the most suitable approach for their tasks, improving versatility. Object-oriented features offer benefits in terms of code reusability and organization, essential for large-scale software projects. Procedural paradigms, on the other hand, provide simplicity and ease of understanding for straightforward tasks. This duality enhances Python's adaptability across diverse applications, from web development to data analysis, further extending its utility across industries .

Python's dynamic typing means that the programmer does not need to declare variable types explicitly, as the type is determined at runtime based on the assigned value. This offers greater flexibility, as it allows for faster prototyping and fewer lines of code, reducing development time. In contrast, statically typed languages like Java or C require type declarations at compile-time, which can constrain the coding process and increase verbosity .

Despite being slower due to its interpreted nature, Python's simplicity, extensive libraries, and ease of debugging significantly outweigh its performance drawbacks in many application scenarios. These features promote productivity and innovation by reducing development time and effort. For performance-critical applications, Python can be integrated with faster languages like C through its extensibility capabilities. Hence, while performance can be a limitation, Python's advantages in development speed and adaptability often outrun these concerns, especially in contexts where time-to-market is crucial .

Python has evolved significantly since its initial release in 1994 with version 1.0, steadily incorporating features to meet contemporary programming needs. Python 2.0 introduced list comprehensions and garbage collection, while Python 3.0 emphasized improving language consistency and removing deprecated constructs. This continuous evolution has ensured backward compatibility to a practical extent while integrating new paradigms, such as support for Unicode and async programming. These enhancements have enabled Python to remain relevant and effective for a wide range of modern applications from web services to AI .

Python's interpreted nature allows for immediate execution of code without the need for a separate compilation step, which accelerates the edit-test-debug cycle. Additionally, its extensive libraries provide pre-built functionality, reducing the need for developers to write code from scratch. These elements together enable rapid prototyping and swift development cycles, making Python particularly attractive for projects requiring fast turnaround times .

Python was named after the BBC TV show "Monty Python's Flying Circus," not after the snake. This choice reflects Guido van Rossum's appreciation for the show's humor, appealing to a community of developers who value creativity and playfulness. This cultural reference likely contributed to a community that's open-minded and innovative, fostering an environment that encourages rapid growth and adoption .

Endorsement by giants such as Google and NASA significantly boosted Python's credibility, portraying it as a reliable and capable language for complex systems. Such organizations validated Python's stability, performance, and versatility through their large-scale implementations, encouraging other companies to consider Python for their technical challenges. This increased confidence in Python's capability to handle diverse and sophisticated applications has accelerated its adoption across various industries, cementing its reputation as a capable and robust programming language .

Python's extensibility allows integration with existing legacy systems by using non-Python code, thus leveraging potentially more efficient codebases without complete overhauls. Embedding Python in other language programs enables incremental modernization, allowing developers to enrich legacy applications with new features while capitalizing on Python's functionality. This approach facilitates performance improvement by using optimized code segments from languages like C or C++ while maintaining Python's readability and simplicity for new developments .

You might also like