Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Python Basics for Beginner

Rating
-
Sold
-
Pages
27
Uploaded on
26-01-2021
Written in
2020/2021

Each and every concept is clear with example . it is to understand the material.

Institution
Course

Content preview

Class -1
INTRODUCTION

History

 Python is a fairly old language created by Guido Van Rossum. The design began in the late
1980’s and was first released in February 1991.
 In late 1980’s Guido Van Rossum was working on the Amoeba Distributed Operating
System Group.
 He wanted to use an interpreted language like ABC (ABC has simple easy-to-understand
syntax) that could access the Amoeba System Calls. So, he decided to create a language
that was extensible. This led to design a new language.
 Now a day, it became much popular because it is highly productive as compared with
other programming languages.
 It has grown to be one of the most widely used Web and system scripting languages.
 Python is interpreted, object oriented and high level programming language.
 Python is a cross-platform programming language, meaning, it runs on multiple platforms
like Windows, Mac OS X, Linux, Unix and has even been ported to the Java and .NET virtual
machines.
 Python has a wide variety of uses, including the following:
 Command-line tools development
 Web development (ex:- Django)
 Component integration
 Database access and manipulation
 Distributed programming
 Parsing
 Image processing
 Scientific programming
Features of Python Programming
1. A simple language which is easier to learn
2. Free and open source
3. Portability
4. Extensible and Embedded
5. A high level, interpreted language
6. Large standard libraries to solve common tasks
7. It supports procedure and object oriented
Python released in different versions
- Python 2.7
- Python 3.5
- Python 3.6
- Python 3.7
- Python 3.8 also released




CHAITANYA DEEMED TO BE UNIVERSITY By T.Ranjith Kumar, Assistant Professor

, Class - 2

Basic Python Syntax


1. The Python language has many similarities to Perl, C, and Java. However, there are some
definite differences between the languages.
2. Interactive Mode Programming
3. Script Mode Programming
4. Python Identifiers
A Python identifier is a name used to identify a variable, function, class, module or other
object. An identifier starts with a letter A to Z or a to z or an underscore _ followed by
zero or more letters, underscores and digits 0to9.
Python does not allow punctuation characters such as @, $, and % within identifiers.
Python is a case sensitive programming language. Thus, Manpower and manpower are
two different identifiers in Python.
Here are naming conventions for Python identifiers
 Class names start with an uppercase letter. All other identifiers start with a
lowercase letter.
 Starting an identifier with a single leading underscore indicates that the identifier
is private.
 Starting an identifier with two leading underscores indicates a strongly private
identifier.
 If the identifier also ends with two trailing underscores, the identifier is a
language-defined special name.

5. Reserved Words

The following list shows the Python keywords. These are reserved words and we cannot
use them as constant or variable or any other identifier names. All the Python keywords
contain lowercase letters only.

and exec not
assert finally or
break for pass
class from print
continue global raise
def if return
del import try
elif in while
else is with
except lambda yield




CHAITANYA DEEMED TO BE UNIVERSITY By T.Ranjith Kumar, Assistant Professor

, 6. Lines and Indentation
 Python provides no braces to indicate blocks of code for class and function
definitions or flow control. Blocks of code are denoted by line indentation, which
is rigidly enforced.
 The number of spaces in the indentation is variable, but all statements within the
block must be indented the same amount.

7. Multi-Line Statements
 Statements in Python typically end with a new line. Python does, however, allow
the use of the line continuation character (\) to denote that the line should
continue.

8. Quotation in Python
Single Quotation (‘ ‘)
Double Quotation(“ “)

9. Comments in Python
In python comments are placed with a symbol ‘#’

10. Multiple Statements on a Single Line
When we write statements in a single line each statement is separated by semi
colon (;) it indicates the statement completed.




CHAITANYA DEEMED TO BE UNIVERSITY By T.Ranjith Kumar, Assistant Professor

Written for

Institution
Course

Document information

Uploaded on
January 26, 2021
File latest updated on
January 26, 2021
Number of pages
27
Written in
2020/2021
Type
Class notes
Professor(s)
Ranjith
Contains
All classes

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Ranjith

Get to know the seller

Seller avatar
Ranjith Chaitanya
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
5 year
Number of followers
1
Documents
0
Last sold
5 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions