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

Python Class 1

PYthon ppt

Uploaded by

dr.maishrajput20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Python Class 1

PYthon ppt

Uploaded by

dr.maishrajput20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

HLEI (OPC) PRIVATE LIMITED

PYTHON –
JOB READY
PRESENTED BY
CLASS-01
DEVENDER SINGH
HLEI (OPC) PRIVATE LIMITED

1. WEEK
1 Introduction 4 Operators

2 Data Type 5 Loops

3 String and String methods 6 Number Methods/math


module

Assessment- 1
HLEI (OPC) PRIVATE LIMITED

Programming Language
Python Intro

• Python is one of the most popular and fastest-growing programming language


in the world.
• Python is a high-level programming language.
• The Programming Language Python was conceived in the late 1980s and its
implementation was started in December 1989 by Guido van Rossum at CWI
(Centrum Wiskunde & Informatica) in the Netherlands as a successor to ABC
Capable of exception handling and interfacing with the Amoeba operating
System
• Its original creator, Guido van Rossum, named it after the BBC television
show “Monty Python’s Flying Circus”.
CWI (Centrum wiskundes and
Informatica)
Centrum Wiskundes & Informatica (CWI) is the national
research institute for mathematics and computer science
in the Netherlands.
HLEI (OPC) PRIVATE LIMITED

Python is used
• Web frameworks and • Graphic Design
application • Image Processing
• GUI Based desktop Application
application • Games
• Data Science and Data • Scientific/Computational
Visualization Application
• ML AND AI
HLEI (OPC) PRIVATE LIMITED

Comparison of Java language and python

JAVA: Python:
class HelloWorld { print(“Hello, World!”)
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
HLEI (OPC) PRIVATE LIMITED

Why Python
• Simple and easy to use.
• Work on different Platforms.
• Use simple syntax like English.
• Fewer Lines of code as compared to other language.
• Interpreted language
• Python can be treated procedurally, in an object-oriented way, and
Functional way.
HLEI (OPC) PRIVATE LIMITED

What can python do?


• Python can be used on a server to create web pages.
• Python can connect to a database system. It can also read and
modify files.
• Python can be used to handle big data and perform complex
mathematics problems.
HLEI (OPC) PRIVATE LIMTED

Python Installation
Https://www.python.org/downloads
HLEI (OPC) PRIVATE LIMITED

print(“Welcome to HLEI”)
First
Python
Program
It is a Function
It is content
HLEI (OPC) PRIVATE LIMITED

Syntax Error
First
Python
Program
Error
HLEI (OPC) PRIVATE LIMITED

Syntax Error
First
Python Python syntax errors happen when the Python interpreter is unable

Program
to recognize the structure of the statement in code.
A syntax error is happening because of missing a comma or a

Error
quotation mark or misspelling a word
HLEI (OPC) PRIVATE LIMITED

Commnads line Based

How to run
Program
HLEI (OPC) PRIVATE LIMITED

Commands line Based

How to run
Program GUI Based

Google
Visual Studio
PyCharm (IDE) Collaboratory
Code (IDE)
HLEI (OPC) PRIVATE LIMITED

Visual Studio
HLEI (OPC) PRIVATE LIMITED

Google
Colaboratory
HLEI (OPC) PRIVATE LIMITED

PyCharm (IDE)
HLEI (OPC) PRIVATE LIMITED

String and
print(“Welcome” + “HLEI”)
number print(“Hello”,8)
Adding print(“hello”,” World”)
Python print(8+9)
Program
HLEI (OPC) PRIVATE LIMITED

Write a program to print this syntax:


Print(“Hello Everyone”)
HLEI (OPC) PRIVATE LIMITED

Print Multiple lines

For print multiple string lines we can use


(“””) this triple quotes and at the last
Print(“”” How are you
where we want to close the line write
Everyone I hope
again triple quotes(“””) All are well “””)
HLEI (OPC) PRIVATE LIMITED

Comments

Comment is a special line of code that can’t affect our program.


It is those lines that can’t be executed in our program.
HLEI (OPC) PRIVATE LIMITED

Why using Comments

• For code hiding.


• In code for lines hiding.
• For giving information about the code.
HLEI (OPC) PRIVATE LIMITED

Types of comments

Comment

Single line Multiple


comment line
Comments
HLEI (OPC) PRIVATE LIMITED

Single line Comments

It is used to hide a single line of code.

#print(“hello everyone”)
HLEI (OPC) PRIVATE LIMITED

Multiple line Comments

This is used to hide multiple lines of “”” How are you


Everyone I hope
comments All are well “””
HLEI (OPC) PRIVATE LIMTED

Escape Sequence

• To insert characters that are illegal in a string, use an escape character.

1. \n
2. \t
3. \”
HLEI (OPC) PRIVATE LIMITED

Variables
It is a container in which we can store
any value. • A=5;
We can store short names (a,b,c) • Name= “Devender”
OR • print(a)
• print(Name)
More Description name (name, age,
email)
Rules for python varible
• A variable name must start with a letter or the
underscore character.
• A variable does not start with a number.
• A variable can contain an alphanumeric character
or underscore like (hi_13)
• Variable name is case sensitive.
• A variable name can not be any of the Python key-
word
question

Can we assign multiple variables to multiple values?


question

Can we assign one value to multiple variables?


Any query

You might also like