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

Khushi Bisht

The document is a seminar report on 'Introduction to Python for Beginners' presented by Anurag Pathak under the guidance of Dr. Mukesh Joshi. It covers various aspects of Python including its history, data types, loops, conditional statements, and its applications in different fields. The report concludes by highlighting Python's advantages such as being free, object-oriented, and easy to learn.

Uploaded by

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

Khushi Bisht

The document is a seminar report on 'Introduction to Python for Beginners' presented by Anurag Pathak under the guidance of Dr. Mukesh Joshi. It covers various aspects of Python including its history, data types, loops, conditional statements, and its applications in different fields. The report concludes by highlighting Python's advantages such as being free, object-oriented, and easy to learn.

Uploaded by

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

SCHOOOL OF COMPUTING

MOOC BASED SEMINAR REPORT

On
INTRODUCTION
TO
PYTHON FOR BEGINNERS
UNDER
THE GUIDANCE OF
Dr. MUKESH JOSHI

-BY ANURAG PATHAK


CERTIFICATE
THIS IS TO CERTIFY THAT KHUSHI BISHT HAS SATISFACTORILY PRESENTED MOOC BASED
SEMINAR ON THE COURSE TITLE INTRODUCTION TO PYTHON FOR BEGINNERS IN
PARTIAL FULLFILLMENT OF THE SEMINAR PRESENTATION REQUIREMENT IN 3rd SEMESTER OF
BCA DEGREE COURSE PRESCRIBED BY GRAPHIC ERA HILL UNIVERSITY DURING THE

ACADEMIC SESSION (2023-2024).

Mooc Coordinator and Mentor HOD


Dr. MUKESH JOSHI Dr.S.K. Budhani

Signature Signature
STUDENT’S DECLARATION

I Anurag pathak take this opportunity to express my


profounfound gratitude and deep regard to my guide Dr.Mukesh
joshi for his extreme guidance monitoring and constant
encouragement throughout the course. The blessing ,help and
guidance given by him time to time helped me throughout the
project. The Success and final outcome of this course required a
lot of guidance and assistance From many people and I am
extremely privileged to have got this all along the completion of
my report. All that I have Done is only due to such supervision
and assistance and I would not forget to thank them. I am
Thankful to and fortunate enough to get constant
encouragement, support and guidance from all the people
around me which helped me in successfully completing my
online course.

Anurag pathak
22042921
Table Of Contents

CHAPTER 1. Introduction

1.1 Python
1.4 History of python

CHAPTER 2. Data Types & Operator

2.1 Variables
2.2 String

CHAPTER 3. Tuple & List


3.1 Tuple
3.1.1 Accessing Tuple Values
3.1.2 Basic Tuple Operations
3.2 List
3.2.1 Accessing List Values
CHAPTER 4. Loops & Conditional Statements
4.1 Loops
4.1.1 Loops Definition
4.2 Conditional Statement
4.2.1 Conditional Statement Definition
4.3 Function

CHAPTER 5. Uses & Scope


5.1 Scope of Python
5.2 What can we do With Python?
5.3 Who Uses Python Today?
5.4 Why do People Use Python

CHAPTER 6. Conclusion
INTRODUCTION TO PYTHON

Python is a widely used high-level, general-purpose, interpreted, dynamic programming


language. Its design philosophy emphasizes code readability, and its syntax allows
programmers to express concepts in fewer lines of code than would be possible in
languages such as C++ or Java. The language provides constructs intended to enable
clear programs on both a small and large scale.

Python is object – oriented


Structure supports such concepts as polymorphism, operation overloading, and multiple
inheritance. It’s free (open source) language.
Downloading and installing Python is free and easy Source code is easily accessible.

Python supports multiple programming paradigms, including object-oriented, imperative


and functional programming or procedural styles. It features a dynamic type system and
automatic memory management and has a large and comprehensive standard library.
Python interpreters are available for installation on many operating systems, allowing
Python code execution on a wide variety of systems.
Python is general purpose programming language that is often applied in
scripting roles. So, it is programming language as well as scripted language .
Python is also called as INTERPRETED LANGUAGE

Python can serve as a scripting language for web application. Libraries like NumPy ,SciPy
and Matplotlib allow the effective use of Python in scientific computing . With
specialized libraries such as Biopython and ASTROPY providing domain-specific
functionality.
History ofofPython
History Python

Python was conceived in the late 1980s, and its implementation was started in
December 1989 by Guido van Rossum at CWI in the Netherlands as a successor to the
ABC language (itself inspired by SETL) capable of exception handling and interfacing with
the Amoeba operating system. Van Rossum is Python's principal author, and his
continuing central role in deciding the direction of Python is reflected in the title given to
him by the Python community, benevolent dictator for life (BDFL).
Guido Van Rossum was a fan of ‘Monty Python Flying Circus’, this is famous TV show in
Netherlands so the name Python is derived after Monty Python.
Data Type

Data types determine whether an object can do something, or whether it just would not
make sense. Other programming languages often determine whether an operation
makes sense for an object by making sure the object can never be stored somewhere
where the operation will be performed on the object (this type system is called static
typing). Python does not do that. Instead it stores the type of an object with the object,
and checks when the operation is performed whether that operation makes sense for
that object (this is called dynamic typing).Python has many native data types.
Here are the important ones:

Booleans are either True or False.

Numbers can be integers (1 and 2), floats (1.1 and 1.2), fractions (1/2 and 2/3), or even
complex numbers.

Strings are sequences of Unicode characters, e.g. an HTML document.

Bytes and byte arrays, e.g. a JPEG image file.

Lists are ordered sequences of values.


Tuples are ordered, immutable sequences of values.
Sets are unordered bags of values.

Variable
Variables are nothing but reserved memory locations to store values.
This means that when you create a variable you reserve some space in memory.

Based on the data type of a variable, the interpreter allocates memory and decides what
can be stored in the reserved memory.
Therefore, by assigning different data types to variables, you can store integers,
decimals or characters in these variables.

Ex:
counter = 100 # An integer assignment
miles = 1000.0 # A floating point
name = "John" # A string
STRING

In programming terms, we usually call text a string. When you think of a string as a
collection of letters, the term makes sense. All the letters, numbers, and symbols in this
book could be a string. For that matter, your name could be a string, and so could your
address.

In Python, we create a string by putting quotes around text. For example, we could take
our otherwise useless

• "hello"+"world" "helloworld" # concatenation


• "hello"*3 "hellohellohello" # repetition
• "hello"[0] "h" # indexing
• "hello"[-1] "o" # (from end)
• "hello"[1:4] "ell" # slicing
Tuples
A tuple is a sequence of immutable Python objects. Tuples are sequences, just like
lists. The differences between tuples and lists are, the tuples cannot be changed unlike
lists and tuples use parentheses, whereas lists use square brackets.
Creating a tuple is as simple as putting different comma-separated values. Optionally you
can put these comma-separated values between parentheses also.

For example −
tup1 = ('physics', 'chemistry', 1997, 2000);
tup2 = (1, 2, 3, 4, 5 );
tup3 = "a", "b", "c", "d";

Accessing Values in Tuples:


To access values in tuple, use the square brackets for slicing along with the index or
indices to obtain value available at that index.

For example −
tup1 = ('physics', 'chemistry', 1997, 2000);
tup2 = (1, 2, 3, 4, 5, 6, 7 );
print "tup1[0]: ", tup1[0]
print "tup2[1:5]: ", tup2[1:5]
When the above code is executed, it produces the following result −
tup1[0]: physics
tup2[1:5]: [2, 3, 4, 5]

Basic Tuples Operations


Tuples respond to the + and * operators much like strings; they mean concatenation and
repetition here too, except that the result is a new tuple, not a string. In fact, tuples
respond to all of the general sequence operations we used on strings in the prior chapter

List
The list is a most versatile datatype available in Python which can be written as a list of
comma-separated values (items) between square brackets. Important thing about a list is
that items in a list need not be of the same type.
Creating a list is as simple as putting different comma-separated values between square
brackets. For example −
list1 = ['physics', 'chemistry', 1997, 2000];
list2 = [1, 2, 3, 4, 5 ];
list3 = ["a", "b", "c", "d"];
Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so
on.
Accessing Values in Lists:

To access values in lists, use the square brackets for slicing along with the index or indices
to obtain value available at that index .
For example −
list1 = ['physics', 'chemistry', 1997, 2000];
list2 = [1, 2, 3, 4, 5, 6, 7 ];
print "list1[0]: ", list1[0]
print "list2[1:5]: ", list2[1:5]
Output:list1[0]: physics
list2[1:5]: [2, 3, 4, 5]
Update: list = ['physics', 'chemistry', 1997, 2000];
print "Value available at index 2 : "
print list[2]
list[2] = 2001;
print "New value available at index 2 : "
print list[2]
Output: Value available at index 2 : 1997
New value available at index 2 : 2001
Loops
Programming languages provide various control structures that allow for more
complicated execution paths.
A loop statement allows us to execute a statement or group of statements multiple
times. The following diagram illustrates a loop statement −
Python programming language provides following types of loops to handle
looping requirements:

• while loop
• for loop
• nested loop

Conditional Statements:

Decision making is anticipation of conditions occurring while execution of the program


and specifying actions taken according to the conditions.
Decision structures evaluate multiple expressions which produce TRUE or FALSE as
outcome. You need to determine which action to take and which statements to execute if
outcome is TRUE or FALSE otherwise.
Python programming language provides following types of decision making
statements :

• if statement
• if….else statement
• nested if else statement

Function

Function blocks begin with the keyword def followed by the function name and
parentheses ( ( ) ).
Any input parameters or arguments should be placed within these parentheses. You can
also define parameters inside these parentheses.
The first statement of a function can be an optional statement - the documentation
string of the function.
The code block within every function starts with a colon (:) and is indented.
Scope of Python
•Science
• Bioinformatics
•System Administration
•Unix
•Web logic
•Web sphere
•Web Application Development
•CGI
•Testing scripts

What Can We do With Python?

•System programming
•Graphical User Interface Programming
•Internet Scripting
•Component Integration
•Database Programming
•Gaming, Images, XML , Robot and more
Who Uses Python Today?
•Python is being applied in real revenue-generating products by real companies.
•Google makes extensive use of Python in its web search system, and employs Python’s
creator.
•Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM use Python for hardware
testing.
•ESRI uses Python as an end-user customization tool for its popular GIS mapping
products.
•The YouTube video sharing service is largely written in Python.

Why Do People Use Python?


The following primary factors cited by Python users
seem to be these:
•Python is object-oriented
Structure supports such concepts as polymorphism, operation overloading, and
multiple inheritance.
•Indentation
Indentation is one of the greatest future in Python.
•It's free (open source)
Downloading and installing Python is free and easy
Source code is easily accessible
•It's powerful
 Dynamic typing
 Built-in types and tools
 Library utilities
 Third party utilities (e.g. Numeric, NumPy, SciPy)
 Automatic memory management
•It's portable
 Python runs virtually every major platform used today
 As long as you have a compatible Python interpreter installed, Python programs will
run in exactly the same manner, irrespective of platform.
Conclusion
•It is Free (as in both cost and source code).
•Python is object – oriented.
•Structure supports such concepts as polymorphism, operation overloading, and
multiple inheritance.
• It’s free (open source) language.
Downloading and installing Python is free and easy Source code is easily accessible.
•It is trivial to install on a Windows PC allowing students to take their interest
further. For many the hurdle of installing a Pascal or C compiler on a Windows
machine is either too expensive or too complicated;
•It is a flexible tool that allows both the teaching of traditional procedural
programming and modern OOP; It can be used to teach a large number of
transferable skills.
•It is a real-world programming language that can be and is used in academia and
the commercial world;
•It appears to be quicker to learn and, in combination with its many libraries, this
offers the possibility of more rapid student development allowing the course to be
made more challenging and varied;
•and most importantly, its clean syntax offers increased understanding and
enjoyment for students.

You might also like