Assignment 1 21EC643 Python Programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Department of Electronics and Communication Engineering

Assignment -1 Questions
Academic Year: 2023-24 Semester: 6 Sec: A, B, C
Subject: Python Programming Subject Code: 21EC643
Course Coordinator: Dr. R. C. Patil Prepared By: Dr. R. C. Patil
Note:
1. CIE may include some questions that are not included in this assignment.
2. Answer any three questions from each theoretical section and any two questions from each programming section

Assignment 1 Submission Date: 31-05-2024


Q. Section 1: Expected C P R SEE Ref.
No. Module 1 Theoretical Questions Marks in O O B
SEE T
S1. 1 What is the need of precedence? Illustrate the rules of 6 1 1, L Jan 2023
precedence in Python with an example. 2 2
S1.2 Explain the local and global scope with a suitable example 6 1 1, L Jan 2023
2 2
S1. 3 What are functions? Explain Python functions with 7 1 1, L Jan 2023
parameters and return statements. 2 2
S1. 4 Define exception handling. How exceptions are handled in 7 1 1, L Jan 2023
Python? Write a program to solve the divide by zero 2 2 Jun 2023
exception.
S1. 5 List and explain the math operators in Python with examples. 7 1 1, L Jun 2023
2 2
S1. 6 With an example explain user-defined functions. 7 1 1, L Jun 2023
2 2
S1. 7 With an example explain the following built-in functions: 1 1, L Jun 2023
i) print( ) 2 2
ii) input( )
iii) len( )

Q. Section 2: Expected C P R SEE Ref.


No. Module 2 Theoretical Questions Marks in O O B
SEE T
S2. 1 Explain negative indexing, slicing, index(), append(), 8 to 10 2 L Jan 2023
remove(), pop(), insert(), reverse() and sort() with suitable 2 Jun 2023
examples.
S2. 2 Explain the use of in and not in operators in a list with suitable 6 2 L Jan 2023
examples. 2 Jun 2023
S2. 3 Explain the following methods in lists with an example. 8 2 1, L Jan 2023
i) len(), 2 2
ii) sum(),
iii) max(),
iv) min()

S2. 4 Show that lists are Mutable 6 2 1, L Jun 2023


2 2
S2. 5 Explain random.choice and random.shuffle functions with lists 6 2 1, L Jun 2023
2 2
Q. Section 3: Expected C P R SEE Ref.
No. Module 1 Programming Questions Marks in O O B
SEE T
S3.1 Develop a Python program to calculate the area of a 6 1 1, L Jan 2023
rectangle, circumference of a circle and area of a circle. 2 3
S3.2 Write a Python program to check whether the number is even 6 1 1, L Jun 2023
or odd 2 3
S3.3 Write a program to print even numbers using step size in range( ). 6 1 1, L Jun 2023
2 3
Q. Section 4: Expected C P R SEE Ref.
No. Module 2 Programming Questions Marks in O O B
SEE T
S4.1 Develop a Python program to swap cases of a given string. 6 2 1, L Jan 2023
Input: Java 2 3
Output: jAVA
S4.2 Write a program to remove multiple empty strings from a list 2 1, L
of strings 2 3
S4.3 Write a Python program to get all unique combinations of two 2 1, L
Lists 2 3

Verified By
Signature Signature Signature
with Date: with Date: with Date:

Course Coordinator CIE Moderation Committee Head of the Department


Member/ First Year Coordinator

Name: Name: Name:

You might also like