0% found this document useful (0 votes)
2 views

2_Setup of Python

The document provides a comprehensive guide on setting up Python, including downloading, installing, and running the first Python program. It introduces tools like Jupyter Notebook and PyCharm Community Edition for Python development. Additionally, it outlines the steps for installation on Windows and highlights the features of the mentioned tools.

Uploaded by

Arif Ahmad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

2_Setup of Python

The document provides a comprehensive guide on setting up Python, including downloading, installing, and running the first Python program. It introduces tools like Jupyter Notebook and PyCharm Community Edition for Python development. Additionally, it outlines the steps for installation on Windows and highlights the features of the mentioned tools.

Uploaded by

Arif Ahmad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Setting up Python

Learning objective
• Getting Python
• Installation of Python
• Getting started with the first Python program
• Running the first Python Program
• Introduction to Jupyter Notebook
• Introduction to PyCharm Community Edition
Getting Python
• The most up-to-date and current source code, binaries,
documentation, news, etc., is available on the official website of
Python:
https://www.python.org/

• You can download Python documentation from


https://www.python.org/doc/

• The documentation is available in HTML, PDF, and PostScript


formats.
Installing Python
• Python distribution is available for a wide variety of platforms.

• Python can be obtained from the Python Software Foundation


website at
https://www.python.org

• Typically, that involves downloading the appropriate installer for


your operating system and running it on your machine.
Installing Python
Here are the steps to install Python on Windows operating system.
1. Open a Web browser and go to
https://www.python.org/downloads/
2. Click on “Download Python 3.13.0” (You may see different
version name).
3. When the download is completed, double-click the file and
follow the instructions to install it.
4. Just accept the default settings, wait until the install is finished,
and you are done.
Installing Python
• When Python is installed, a program called IDLE is also installed
along with it. It provides graphical user interface to work with
Python.

• Integrated Development and Learning Environment.


Program to display welcome message
#include <stdio.h>
#include <conio.h> // Required for getch()

int main() {
printf("Hello");
printf("Press any key to exit...");
getch();
}
Program to display welcome message
#include <iostream>
using namespace std;

int main() {
cout << "Hello" << endl;
return 0;
}
Program to display welcome message
public class Hello {
public static void main(String[] args)
{
System.out.println("Hello");
}
}
Program to display welcome message
using System;

class Program
{
static void Main()
{
Console.WriteLine("Hello");
}
}
Program to display welcome message

SET SERVEROUTPUT ON;

BEGIN
DBMS_OUTPUT.PUT_LINE('Hello');
END;
/
Getting started with 1 Python program
st

• Open IDLE

• To create a file in IDLE, go to File > New File (Shortcut: Ctrl+N).

• Write Python code (you can copy the code below for now) and
save (Shortcut: Ctrl+S) with .py file extension like: hello.py or
yourfirstprogram.py
Running the 1 Python program
st

• Before running the python program, you can save it using Ctrl + S,
OR go to File > Save.

• Now you can run the program. Go to Run > Run module (Shortcut:
F5) and you can see the output.

• Congratulations, you've successfully run your first Python


program.
Introduction to Jupyter Notebook
• Open-source web application that allows to create documents
that contain live code, equations, visualizations, narrative text.

• It is widely used for interactive computing and data analysis.

• Provide an interactive computing environment where you can


write and execute code in small, manageable chunks called cells.

• This allows for an iterative and exploratory approach to


programming and data analysis.
Introduction to Jupyter Notebook
• An integral part of the Anaconda distribution, which is a popular
platform for data science and scientific computing.

• Anaconda is a distribution of Python and other scientific


computing packages that aims to simplify package management
and deployment. It includes a wide range of tools, libraries, and
environments commonly used in data science.

• Anaconda comes with Jupyter Notebook pre-installed.


Introduction to Jupyter Notebook
• Installation process might vary slightly based on your operating
system (Windows, macOS, or Linux).

• Installing Anaconda on Windows:


https://www.anaconda.com/download
• Choose the version of Anaconda that matches your OS(Windows).
• Run the Installer
• Optionally, check the box to add Anaconda to your system's PATH
variable (recommended).
Introduction to PyCharm Community Edition
• Free, open-source version of the PyCharm IDE developed by JetBrains.

• It provides core features for Python development but lacks some advanced
features available in the Professional Edition.

• Offers code completion, syntax highlighting, and basic refactoring tools.

• Integrated Python debugger for local scripts.

• Provides code analysis and highlights warnings or errors directly in the editor.
You have learnt:
• Getting Python
• Installation of Python
• Getting started with the first Python program
• Running the first Python Program
• Introduction to Jupyter Notebook
• Introduction to PyCharm Community Edition

You might also like