0% found this document useful (0 votes)
8 views55 pages

Python Programming Lab Manual

The document is a lab manual for Python programming at Shadan College of Engineering & Technology, detailing laboratory instructions, course objectives, outcomes, and a list of experiments for first-year B.Tech students. It emphasizes the importance of preparation, discipline, and ethical behavior in the lab environment. Additionally, it outlines the college's vision, mission, program educational objectives, and specific outcomes for Computer Science and Engineering students.

Uploaded by

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

Python Programming Lab Manual

The document is a lab manual for Python programming at Shadan College of Engineering & Technology, detailing laboratory instructions, course objectives, outcomes, and a list of experiments for first-year B.Tech students. It emphasizes the importance of preparation, discipline, and ethical behavior in the lab environment. Additionally, it outlines the college's vision, mission, program educational objectives, and specific outcomes for Computer Science and Engineering students.

Uploaded by

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

SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY

(UGC AUTONOMOUS INSTITUTION)


(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

PYTHON PROGERAMMING-LAB MANUAL

BRANCH: Common -CSE&IT, CSE(AI&ML), AI&ML, CSE(AI&DS), AI&DS

I YEAR B. TECH 1I SEM

PREPARED BY

MS. JAVAIRIA BEGUM/ABDUL SHABAAZ KHAN

ASSISSTANT PROFESSOR OF CSE DEPARTMENT

i
SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY
(UGC AUTONOMOUS INSTITUTION)
(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

GENERAL LABORATORY INSTRUCTIONS

1. Students are advised to come to the laboratory at least 5 minutes before (to
the starting time), those who come after 5 minutes will not be allowed into
the lab.
2. Plan your task properly much before to the commencement, come prepared
to the lab with the synopsis / program / experiment details.
3. Student should enter into the laboratory with: a. Laboratory observation
notes with all the details (Problem statement, Aim, Algorithm, Procedure,
Program, Expected Output, etc.,) filled in for the lab session. b. Laboratory
Record updated up to the last session experiments and other utensils (if any)
needed in the lab. c. Proper Dress code and Identity card.
4. Sign in the laboratory login register, write the TIME-IN, and occupy the
computer system allotted to you by the faculty.
5. Execute your task in the laboratory, and record the results / output in the lab
observation notebook, and get certified by the concerned faculty.
6. All the students should be polite and cooperative with the laboratory staff,
must maintain the discipline and decency in the laboratory.
7. Computer labs are established with sophisticated and high end branded
systems, which should be utilized properly.
8. Students / Faculty must keep their mobile phones in SWITCHED OFF
mode during the lab sessions. Misuse of the equipment, misbehaviors with
the staff and systems etc., will attract severe punishment.
9. Students must take the permission of the faculty in case of any urgency to
go out; if anybody found loitering outside the lab / class without permission
during working hours will be treated seriously and punished appropriately.
10. Students should LOG OFF/ SHUT DOWN the computer system before
he/she leaves the lab after completing the task (experiment) in all aspects.
He/she must ensure the system / seat is kept properly.

HEAD OF THE DEPARTMENT PRINCIPAL

ii
SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY
(UGC AUTONOMOUS INSTITUTION)
(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

B.Tech. I Year II Sem LTPC


0 032
Course Objectives:
 To install and run the Python interpreter

 To learn control structures.

 To Understand Lists, Dictionaries in python

 To Handle Strings and Files in Python

Course Outcomes:
After completion of the course, the student should be able to

● Develop the application specific codes using python.

● Understand Strings, Lists, Tuples and Dictionaries in Python

● Verify programs using modular approach, file I/O, Python standard library

● Implement Digital Systems using Python

Note: The lab experiments will be like the following experiment examples.

HEAD OF THE DEPARTMENT PRINCIPAL

iii
SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY
(UGC AUTONOMOUS INSTITUTION)
(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

B.Tech. I Year II Sem LTPC


0 032
COLLEGE VISION
To become a Centre for Excellence in Teaching and Learning, to inculcate innovative research
for sustainability and to provide a better societal safety.

COLLEGE MISSION
1. To ensure the availability of faculty with excellent research potential.

2. To adopt outcome-based education in a student-centric learning model that helps the


faculty to plan course delivery and assessment with the end point in mind, by
identifying curriculum gaps and adding values to fill up the gaps.

3. To provide quality educational opportunity for socially, economically, backward /


weaker section and to enhance ethical standards among all students for a lifelong
learning.

HEAD OF THE DEPARTMENT PRINCIPAL

iv
SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY
(UGC AUTONOMOUS INSTITUTION)
(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

B.Tech. I Year II Sem LTPC


0 032
VISION (CSE)
To be in the frontier of Computer Science and Engineering and to produce globally competent
graduates and post graduates with moral values committed to build a vibrant nation.

MISSION (CSE)
1. To foster academic excellence by recruiting and retaining highly qualified faculty
with strong research potential, who are committed to continuous learning,
innovation, and the advancement of knowledge in computer science and engineering.
2. To implement outcome-based education through a student-centric learning model
that equips students with the technical skills, critical thinking abilities, and problem-
solving competencies needed to succeed in a rapidly evolving digital landscape.
3. To ensure access to quality education for students from diverse socio-economic
backgrounds, particularly for under privileged sections, and to foster an inclusive culture that
promotes ethical

HEAD OF THE DEPARTMENT PRINCIPAL

v
SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY
(UGC AUTONOMOUS INSTITUTION)
(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

B.Tech. I Year II Sem LTPC


0 032

PROGRAM EDUCATIONAL OBJECTIVES (PEOS) - CSE

1. PEO 1 – Excellence in Technical Knowledge and Skills


Graduates will acquire a strong foundation in computer science and engineering,
with the ability to apply modern tools, algorithms, and technologies to solve real-
world problems and contribute to technological innovations across various sectors.
2. PEO 2 – Research and Innovation
Graduates will demonstrate the ability to engage in research and development
activities, adopting an outcome-based approach, and contribute to sustainable,
impactful innovations in computer science, artificial intelligence, and related
domains.
3. PEO 3 – Ethical and Social Responsibility
Graduates will exhibit a strong sense of ethical responsibility, professionalism, and
commitment to social welfare. They will address societal challenges through
technology, ensuring the safe and responsible use of technology for the greater good.
4. PEO 4 – Lifelong Learning and Professional Growth
Graduates will demonstrate a commitment to continuous learning and adapt to rapidly
changing technologies by pursuing advanced studies, certifications, or industry engagement
to stay at the forefront of the field.

HEAD OF THE DEPARTMENT PRINCIPAL

vi
PROGRAM SPECIFIC OUTCOMES (PSOS) - CSE

1. PSO 1 – Software Development and Problem Solving


Graduates will be capable of designing, developing, and deploying software solutions using
state-of-the-art programming languages, frameworks, and development methodologies to
address complex computational and engineering problems.
2. PSO 2 – System Design and Integration
Graduates will possess the skills to design, analyze, and optimize computer systems,
including hardware-software integration, data structures, algorithms, and networks, while
ensuring efficient resource management and scalability.

3. PSO 3 – Research and Innovation for Sustainable Solutions


Graduates will have the ability to engage in research and development activities, leveraging
emerging technologies such as artificial intelligence, machine learning, and data science to
create innovative solutions for sustainability and societal benefit.

HEAD OF THE DEPARTMENT PRINCIPAL

vii
SHADAN COLLEGE OF ENGINEERING & TECHNOLOGY
(UGC AUTONOMOUS INSTITUTION)
(NAAC WITH A+ GRADE, NBA ACCREDITED AND ISO 9001:2015 CERTIFICATE INSTITUTION)
Peerancheru, Hyderabad -500086

B.Tech. I Year II Sem LTPC


0 032
Program outcomes (PO’s):
Engineering Graduates will be able to:

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering
problems.

2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.

3. Design / development of solutions: Design solutions for complex engineering problems


and design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.

4. Conduct investigations of complex problems: Use research-based knowledge and


research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.

5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.

6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.

7. Environment and sustainability: Understand the impact of the professional engineering


solutions in societal and environmental contexts, and demonstrate the knowledge of, and
viii
need for sustainable development.

8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.

9. Individual and team work: Function effectively as an individual, and as a member or


leader in diverse teams, and in multidisciplinary settings.

10. Communication: Communicate effectively on complex engineering activities with the


engineering community and with society at large, such as, being able to comprehend and
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multi-disciplinary environments.

12. Life- long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.

HEAD OF THE DEPARTMENT PRINCIPAL

ix
List of Experiments
Task Experiment Name Page
no number

1.i) Use a web browser to go to the Python website http://python.org.


This page contains information about Python and links to Python-related
pages, and it gives you the ability to search the Python documentation.

ii) Start the Python interpreter and type help () to start the online help
utility.
1
2.Start a Python interpreter and use it as a Calculator.
1-7
3. i) Write a program to calculate compound interest when principal, rate
and number of periods are given.

ii) Given coordinates (x1, y1), (x2, y2) find the distance between two
points

4. Read name, address, email and phone number of a person through


keyboard and print the details.

1. Print the below triangle using for loop.

44

333

2222

2 11111 8-10

2. Write a program to check whether the given input is digit or


lowercase character or uppercase character or a special character (use 'if-
else-if' ladder)

3. Python Program to Print the Fibonacci sequence using while loop

4. Python program to print all prime numbers in a given interval (use


break)

1.i) Write a program to convert a list and tuple into arrays.

ii) Write a program to find common values between two arrays. 11-14

3 2. Write a function called gcd that takes parameters a and b and returns
their greatest common divisor.

x
3. Write a function called palindrome that takes a string argument and
returns True if it is a palindrome and False otherwise. Remember that
you can use the built-in function len to check the length of a string.

1. Write a function called is_sorted that takes a list as a parameter and


returns True if the list is sorted in ascending order and False otherwise.

2. Write a function called has_duplicates that takes a list and returns


True if there is any element that appears more than once. It should not
modify the original list.

i). Write a function called remove_duplicates that takes a list and returns
a new list with only the unique elements from the original. Hint: they
don’t have to be in the same order.

ii). The wordlist I provided, words.txt, doesn’t contain single letter


4 words. So you might want to add “I”, “a”, and the empty string. 15-19

iii). Write a python code to read dictionary values from the user.
Construct a function to invert its content. i.e., keys should be values and
values should be keys.

3.i) Add a comma between the characters. If the given word is 'Apple', it
should become 'A,p,p,l,e' ii) Remove the given word in all the places in a
string?

iii) Write a function that takes a sentence as an input parameter and


replaces the first letter of every word with the corresponding upper case
letter and the rest of the letters in the word by corresponding letters in
lower case without using a built-in function?

4. Writes a recursive function that generates all binary strings of n-bit


length

1.i) Write a python program that defines a matrix and prints

ii) Write a python program to perform addition of two square matrices

iii) Write a python program to perform multiplication of two square


matrices
5 20-22
2. How do you make a module? Give an example of construction of a
module using different geometrical shapes and operations on them as its
functions.

3. Use the structure of exception handling all general purpose exceptions

xi
1. a. Write a function called draw_rectangle that takes a Canvas and a
Rectangle as arguments and draws a representation of the Rectangle on
the Canvas.

b. Add an attribute named color to your Rectangle objects and modify


draw_rectangle so that it uses the color attribute as the fill color.

c. Write a function called draw_point that takes a Canvas and a Point as


arguments and draws a representation of the Point on the Canvas.

6 d. Define a new class called Circle with appropriate attributes and 23-25
instantiate a few Circle objects. Write a function called draw_circle that
draws circles on the canvas.

2. Write a Python program to demonstrate the usage of Method


Resolution Order (MRO) in multiple levels of Inheritances.

3. Write a python code to read a phone number and email-id from the
user and validate it for correctness.

1. Write a Python code to merge two given file contents into a third file.

2. Write a Python code to open a given file and construct a function to


check for given words present in it and display on found.

3. Write a Python code to Read text from a text file, find the word with 26-28
7 most number of occurrences

4. Write a function that reads a file file1 and displays the number of
words, number of vowels, blank spaces, lower case letters and uppercase
letters.

1. Import numpy, Plotpy and Scipy and explore their functionalities.

2. a) Install NumPy package with pip and explore it.

3. Write a program to implement Digital Logic Gates – AND, OR, NOT,


EX-OR 29-34
8
4. Write a program to implement Half Adder, Full Adder, and Parallel
Adder

5. Write a GUI program to create a window wizard having two text


labels, two text fields and two buttons as Submit and Reset.

9 History of python programming 35-37

10 Viva question for the external 38-39

xii
R23 B.Tech. CSIT Syllabus
PYTHON PROGRAMMING LABORATORY
B.Tech. I Year II Sem. LTPC0032
Week -1:
1. i) Use a web browser to go to the Python website http://python.org. This page contains
information about Python and links to Python-related pages, and it gives you the ability to
search the Python documentation.

ii) Start the Python interpreter and type help () to start the online help utility.

2. Start a Python interpreter and use it as a Calculator.

3. i) Write a program to calculate compound interest when principal, rate and number of
periods are given.

ii) Given coordinates (x1, y1), (x2, y2) find the distance between two points

4. Read name, address, email and phone number of a person through keyboard and
print the details.

Week - 2:
1. Print the below triangle using for loop.

44

333

2222

11111

2. Write a program to check whether the given input is digit or lowercase character or
uppercase character or a special character (use 'if-else-if' ladder)

3. Python Program to Print the Fibonacci sequence using while loop

4. Python program to print all prime numbers in a given interval (use break)

xiii
Week - 3:
1. i) Write a program to convert a list and tuple into arrays.

ii) Write a program to find common values between two arrays.

2. Write a function called gcd that takes parameters a and b and returns their greatest
common divisor.

3. Write a function called palindrome that takes a string argument and returns True if it
is a palindrome and False otherwise. Remember that you can use the built-in function len
to check the length of a string.

Week - 4:
1. Write a function called is_sorted that takes a list as a parameter and returns True if the
list is sorted in ascending order and False otherwise.

2. Write a function called has_duplicates that takes a list and returns True if there is any
element that appears more than once. It should not modify the original list.

i). Write a function called remove_duplicates that takes a list and returns a new list with
only the unique elements from the original. Hint: they don’t have to be in the same
order.

ii). The wordlist I provided, words.txt, doesn’t contain single letter words. So you might
want to add “I”, “a”, and the empty string. iii). Write a python code to read dictionary
values from the user. Construct a function to invert its content. i.e., keys should be
values and values should be keys.

2. i) Add a comma between the characters. If the given word is 'Apple', it should
become 'A,p,p,l,e'

ii) Remove the given word in all the places in a string?

iii) Write a function that takes a sentence as an input parameter and replaces the first
letter of every word with the corresponding upper case letter and the rest of the letters in
the word by corresponding letters in lower case without using a built-in function?

3. Writes a recursive function that generates all binary strings of n-bit length

Week - 5:
1. i) Write a python program that defines a matrix and prints

ii) Write a python program to perform addition of two square matrices

iii) Write a python program to perform multiplication of two square matrices

xiv
2. How do you make a module? Give an example of construction of a module using
different geometrical shapes and operations on them as its functions.

3. Use the structure of exception handling all general purpose exceptions.

Week-6:
1. a. Write a function called draw_rectangle that takes a Canvas and a Rectangle as
arguments and draws a representation of the Rectangle on the Canvas.

b. Add an attribute named color to your Rectangle objects and modify draw_rectangle
so that it uses the color attribute as the fill color.

c. Write a function called draw_point that takes a Canvas and a Point as arguments and
draws a representation of the Point on the Canvas.

d. Define a new class called Circle with appropriate attributes and instantiate a few
Circle objects. Write a function called draw_circle that draws circles on the canvas.

2. Write a Python program to demonstrate the usage of Method Resolution Order


(MRO) in multiple levels of Inheritances.

3. Write a python code to read a phone number and email-id from the user and validate
it for correctness.

Week- 7
1. Write a Python code to merge two given file contents into a third file.

2. Write a Python code to open a given file and construct a function to check for given
words present in it and display on found.

3. Write a Python code to Read text from a text file, find the word with most number of
occurrences

4. Write a function that reads a file file1 and displays the number of words, number of
vowels, blank spaces, lower case letters and uppercase letters.

Week - 8:
1. Import numpy, Plotpy and Scipy and explore their functionalities.

2. a) Install NumPy package with pip and explore it.

3. Write a program to implement Digital Logic Gates – AND, OR, NOT, EX-OR

4. Write a program to implement Half Adder, Full Adder, and Parallel Adder

5. Write a GUI program to create a window wizard having two text labels, two text fields
and two buttons as Submit and Reset.

xv
TEXT BOOKS:
1. Supercharged Python: Take your code to the next level, Overland

2. Learning Python, Mark Lutz, O'reilly

REFERENCE BOOKS:
1. Python for Data Science, Dr. Mohd. Abdul Hameed, Wiley Publications - 1 st Ed.
2021.

2. Python Programming: A Modern Approach, Vamsi Kurama, Pearson

3. Python Programming A Modular Approach with Graphics, Database, Mobile, and


Web Applications, Sheetal Taneja, Naveen Kumar, Pearson

4. Programming with Python, A User’s Book, Michael Dawson, Cengage Learning,


India Edition

5. Think Python, Allen Downey, Green Tea Press

6. Core Python Programming, W. Chun, Pearson

7. Introduction to Python, Kenneth A. Lambert, Cengage

xvi
Course Objectives:
 To install and run the Python interpreter

 To learn control structures.

 To Understand Lists, Dictionaries in python

 To Handle Strings and Files in Python

Course Outcomes:
After completion of the course, the student should be able to

● Develop the application specific codes using python.

● Understand Strings, Lists, Tuples and Dictionaries in Python

● Verify programs using modular approach, file I/O, Python standard library

● Implement Digital Systems using Python

Note: The lab experiments will be like the following experiment examples.

CO-PO mapping:
CO PO PO PO PO PO PO PO PO PO PO PO PO
1 2 3 4 5 6 7 8 9 10 11 12
Python CO1 1 2 1 1 1 2
program
ming CO2 5 2 2 2
Lab
CO3 1 2 2 1 1 2
CO4 2 3 2 4 2

xvii
1
2
3
4
5
6
7
8
9
10
Print (np. intersect 1d (ar1, ar2))

11
enter another number:25

12
13
14
15
16
Result: [‘a’,’p’,’p’,’l’,’e’]

17
18
19
20
21
22
Obj.m()

23
24
25
26
27
28
29
30
31
32
33
34
History of Python
The programming language 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 ABC 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). (However, Van Rossum stepped down as
leader on July 12, 2018.). Python was named after the BBC TV show Monty Python's Flying
Circus.

Python 2.0 was released on October 16, 2000, with many major new features, such as list
comprehensions, cycle-detecting garbage collector (in addition to reference counting)
and reference counting, for memory management and support for Unicode, along with a
change to the development process itself, with a shift to a more transparent and community-
backed process.

Python 3.0, a major, backwards-incompatible release, was released on December 3, 2008 after
a long period of testing. Many of its major features have also been backported to the
backwards-compatible, though now-unsupported, Python 2.6 and 2.7. Releases of Python 3
include the 2to3 utility, which automates the translation of Python 2 code to Python 3.

Early history:
In February 1991, Van Rossum published the code (labeled version 0.9.0) to
alt.sources. Already present at this stage in development were classes with inheritance,
exception handling, functions, and the core datatypes of list, dict, str and so on. Also in this
initial release was a module system borrowed from Modula-3; Van Rossum describes the
module as "one of Python's major programming units”. Python’s exception model also
resembles Modula-3's, with the addition of an else clause. In 1994 comp.lang.python, the
primary discussion forum for Python, was formed, marking a milestone in the growth of
Python's user base and popularity.

Table of versions:

 Implementation started – December, 1989


 Internal releases at Centrum Wiskunde & Informatica – 1990

35
Version Latest micro Release date End of full End of
version support security fixes

0.9 0.9.9 1991-02-20 1993-07-29


1.0 1.0.4 1994-01-26 1994-07-14
1.1 1.1.1 1994-10-11 1994-11-10
1.2 1995-04-13 unsupported
1.3 1995-10-13 unsupported
1.4 1996-10-25 unsupported
1.5 1.5.2 1998-01-03 1999-04-13
1.6 1.6.1 2000-09-05 2000-09
2.0 2.0.1 2000-10-16 2001-06-22
2.1 2.1.3 2001-04-15 2002-04-09
2.2 2.2.3 2001-12-21 2003-05-30
2.3 2.3.7 2003-06-29 2008-03-11
2.4 2.4.6 2004-11-30 2008-12-19
2.5 2.5.6 2006-09-19 2011-05-26
2.6 2.6.9 2008-10-01 2010-08-24 2013-10-29
2.7 2.7.18 2010-07-03 2020-01-01
3.0 3.0.1 2008-12-03 2009-06-27
3.1 3.1.5 2009-06-27 2011-06-12 2012-04-06
3.2 3.2.6 2011-02-20 2013-05-13 2016-02-20
3.3 3.3.7 2012-09-29 2014-03-08 2017-09-29
3.4 3.4.10 2014-03-16 2017-08-09 2019-03-18

36
3.5 3.5.10 2015-09-13 2017-08-08 2020-09-30
3.6 3.6.15 2016-12-23 2018-12-24 2021-12-23
3.7 3.7.17 2018-06-27 2020-06-27 2023-06-06
3.8 3.8.20 2019-10-14 2021-05-03 2024-10-07
3.9 3.9.21 2020-10-05 2022-05-17 2025-10
3.10 3.10.16 2021-10-04 2023-04-05 2026-10
3.11 3.11.11 2022-10-02 2024-04-02 2027-10
3.12 3.12.9 2023-10-02 2025-05 2028-10
3.13 3.13.2 2024-10-07 2026-05 2029-10
3.14 3.14.0 2025-10-01 2027-05 2030-10

:
Old version, not maintained
Old version, still maintained
Latest version
Latest preview version
Future version

37
Viva Question:
1. What is Python? Why is it called an interpreted language?

2. What are the key features of Python?

3. Explain the difference between Python 2 and Python 3.

4. What are Python's built-in data types? Give examples.

5. What are mutable and immutable data types in Python?

6. Explain the difference between a list, tuple, set, and dictionary in Python.

7. How do you iterate over a dictionary?

8. How do you remove duplicates from a list?

9. What is the difference between shallow copy and deep copy?

10. What is object-oriented programming (OOP)? How is it implemented in Python?

11. What are Python classes and objects? How do you define a class in Python?

12. What is the purpose of the self-keyword in Python classes?

13. How is exception handling done in Python?

14. What is the purpose of try, except, else, and finally blocks?

15. What is the difference between raise and assert?

16. What is NumPy? Why is it used?

17. How does the Pandas library help in data analysis?

18. Explain the concept of list comprehension with examples.

19. What are Python decorators, and how are they used?

20. What is a generator in Python? How is it different from a normal function?

38

You might also like