0% found this document useful (0 votes)
7 views12 pages

5 Mayank Python Introduction

Uploaded by

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

5 Mayank Python Introduction

Uploaded by

ratangulipilli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

“Advanced Machine Learning”

Introduction to Programming
1. What is Python?

Python is a very popular general-purpose interpreted, interactive, object-oriented, and high-level


programming language. Python is dynamically-typed and garbage-collected programming language.

It was created by Guido van Rossum during 1985- 1990.

Python supports multiple programming paradigms, including Procedural, Object Oriented and
Functional programming language.

Today, Python is very high in demand and all the major companies are looking for great Python
Programmers to develop websites, software components, and applications or to work with Data
Science, AI, and ML technologies.

2. Why Learn Python?

 Python is Open Source which means its available free of cost.


 Python is simple and so easy to learn
 Python is versatile and can be used to create many different things.
 Python has powerful development libraries include AI, ML etc.
 Python is much in demand and ensures high salary

3. key advantages of learning Python

 Python is Interpreted − Python is processed at runtime by the interpreter. You do not need
to compile your program before executing it. This is similar to PERL and PHP.
 Python is Interactive − You can actually sit at a Python prompt and interact with the
interpreter directly to write your programs.
 Python is Object-Oriented − Python supports Object-Oriented style or technique of
programming that encapsulates code within objects.
 Python is a Beginner's Language − Python is a great language for the beginner level
programmers and supports the development of a wide range of applications from simple
text processing to WWW browsers to games.

4. Key skills of Python

 Game developer
 Web designer
 Python developer
 Full-stack developer
 Machine learning engineer
 Data scientist
 Data analyst
 Data engineer
 DevOps engineer
 Software engineer
 Many more other roles

5. Characteristics of Python

Following are important characteristics of Python Programming −

 It supports functional and structured programming methods as well as OOP.


 It can be used as a scripting language or can be compiled to byte-code for building large
applications.
 It provides very high-level dynamic data types and supports dynamic type checking.
 It supports automatic garbage collection.
 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.

6. Applications of Python

 Easy-to-learn − Python has few keywords, simple structure, and a clearly defined
 syntax. This allows the student to pick up the language quickly.
 Easy-to-read − Python code is more clearly defined and visible to the eyes.
 Easy-to-maintain − Python's source code is fairly easy-to-maintain.
 A broad standard library − Python's bulk of the library is very portable and cross platform
compatible on UNIX, Windows, and Macintosh.
 Interactive Mode − Python has support for an interactive mode which allows interactive
testing and debugging of snippets of code.
 Portable − Python can run on a wide variety of hardware platforms and has the same
interface on all platforms.
 Extendable − You can add low-level modules to the Python interpreter. These modules
enable programmers to add to or customize their tools to be more efficient.
 Databases − Python provides interfaces to all major commercial databases.
 GUI Programming − Python supports GUI applications that can be created and ported to
many system calls, libraries and windows systems, such as Windows MFC, Macintosh, and
the X Window system of Unix.
 Scalable − Python provides a better structure and support for large programs than shell
scripting.

7. Installation of Python

A. Unix and Linux Installation

Here are the simple steps to install Python on Unix/Linux machine.

 Open a Web browser and go to http://www.python.org/download/.


 Follow the link to download zipped source code available for Unix/Linux.
 Download and extract files.
 Editing the Modules/Setup file if you want to customize some options.
 run ./configure script
 make
 make install

This installs Python at standard location /usr/local/bin and its libraries at /usr/local/lib/pythonXX
where XX is the version of Python.
B. Windows

 Open a Web browser and go to http://www.python.org/download/


 Follow the link for the Windows installer python-XYZ.msi file where XYZ is the version you
need to install.
 To use this installer python-XYZ.msi, the Windows system must support Microsoft Installer
2.0. Save the installer file to your local machine and then run it to find out if your machine
supports MSI.
 Run the downloaded file. This brings up the Python install wizard, which is really easy to use.
Just accept the default settings, wait until the install is finished, and you are done.
Step 3 — Adding Python to the Environment Variables
(optional)
 Go to Start and enter advanced system settings in the search bar.

 Click View advanced system settings.

 In the System Properties dialog, click the Advanced tab and then click Environment
Variables.

 Depending on your installation:

 If you selected Install for all users during installation, select Path from the list of
System Variables and click Edit.
 If you didn’t select Install for all users during installation, select Path from the list of
User Variables and click Edit.
 Click New and enter the Python directory path, then click OK until all the dialogs are
closed.

Step 4 — Verify the Python Installation
Go to Start and enter cmd in the search bar. Click Command Prompt.

python --version
Output
Python 3.10.10
Experiment of Notepad/ CMD python

What is an IDE?

 An IDE enables programmers to combine the different aspects of writing a computer


program.

 IDEs increase programmer productivity by introducing features like editing source code,
building executables, and debugging.

1. IDLE

 IDLE (Integrated Development and Learning Environment) is a default editor that


accompanies Python

 This IDE is suitable for beginner-level developers

 The IDLE tool can be used on Mac OS, Windows, and Linux

 Price: Free
2. PyCharm

 PyCharm is a widely used Python IDE created by JetBrains

 This IDE is suitable for professional developers and facilitates the development of
large Python projects

 Price: Freemium

3. Visual Studio Code

 Visual Studio Code is an open-source (and free) IDE created by Microsoft. It finds great
use in Python development
 VS Code is lightweight and comes with powerful features that only some of the paid IDEs
offer

 Price: Free

4. Jupyter

 Jupyter is widely used in the field of data science

 It is easy to use, interactive and allows live code sharing and visualization

 Price: Free
5. Spyder

 Spyder is an open-source IDE most commonly used for scientific development

 Spyder comes with Anaconda distribution, which is popular for data science and machine
learning

 Price: Free
Anaconda Installation
1. Download the Anaconda installer.

2. Go to your Downloads folder and double-click the installer to launch. To


prevent permission errors, do not launch the installer from the Favorites
folder.

3. Click Next.
4. Read the licensing terms and click I Agree.
5. It is recommended that you install for Just Me, which will install Anaconda
Distribution to just the current user account. Only select an install for All
Users if you need to install for all users’ accounts on the computer (which
requires Windows Administrator privileges).
6. Click Next.
7. Select a destination folder to install Anaconda and click Next. Install
Anaconda to a directory path that does not contain spaces or unicode
characters.

8. Choose whether to add Anaconda to your PATH environment variable or register


Anaconda as your default Python. We don’t recommend adding Anaconda to your PATH
environment variable, since this can interfere with other software. Unless you plan on
installing and running multiple versions of Anaconda or multiple versions of Python, accept
the default and leave this box checked. Instead, use Anaconda software by opening
Anaconda Navigator or the Anaconda Prompt from the Start Menu.

9. Click Install. If you want to watch the packages Anaconda is installing, click Show
Details.

10. Click Next.


11. After a successful installation you will see the “Thanks for installing Anaconda”
dialog box:

12. If you wish to read more about Anaconda.org and how to get started with
Anaconda, check the boxes “Anaconda Distribution Tutorial” and “Learn more about
Anaconda”. Click the Finish button.

You might also like