[go: up one dir, main page]

0% found this document useful (0 votes)
17 views4 pages

4 Marks

The document contains a series of programming tasks and questions related to Python, covering topics such as loops, functions, data types, and file handling. It includes specific programming exercises, explanations of built-in functions, and concepts like decision-making statements and inheritance. The tasks are organized by semester, indicating a curriculum structure for learning Python programming.

Uploaded by

sunnygaikwad4747
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)
17 views4 pages

4 Marks

The document contains a series of programming tasks and questions related to Python, covering topics such as loops, functions, data types, and file handling. It includes specific programming exercises, explanations of built-in functions, and concepts like decision-making statements and inheritance. The tasks are organized by semester, indicating a curriculum structure for learning Python programming.

Uploaded by

sunnygaikwad4747
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/ 4

4marks

Summer 22

a)Write a program to print following:

1
12
123
1234

b) Explain four Buit-in tuple functions python with example.

c) Explain how to use user defined function in python with example.

d) Write a program to create class EMPLOYEE with ID and NAME and display its contents.

a) List Data types used in python. Explain any two with example.

b) Explain membership and assignment operators with example.

c) Explain indexing and slicing in list with example.

d) Write a program for importing module for addition and substraction of two numbers.

a) Write a program to create dictionary of students that includes their ROLL NO. and NAME

. i) Add three students in above dictionary

ii) Update name = ‘Shreyas’ of ROLL NO = 2

iii) Delete information of ROLL NO = 1

b) Explain decision making statements If- else, if- elif- else with example.

c) Explain use of format () method with example.

d) Explain building blocks of python.

e) Write a program illustrating use of user defined package in python.

Summer 23

a) Describe Keyword "continue" with example.

b) Explain creating Dictionary and accessing Dictionary Elements with example.

c) Explain any four Python's Built-in Function with example.


d) Write a Python program to find the factorial of a number provided by the user.

a) Write a python program to input any two tuples and interchange the tuple variables.

b) Explain Bitwise operator in Python with appropriate example.

c) With neat example differentiate between readline() and readlines() functions in file-handling.

d) Describe 'Self' Parameter with example

a) Differentiate between list and Tuple.

b) Explain any four file modes in Python.

c) Write a program to show user defined exception in Python.

d) Explain Module and its use in Python

Summer 24

a) Explain with example: i) Indentation ii) Variables

b) Print the following pattern using loop:

1010101

10101

101

c) Write python program to perform following operations on set.

i) Create set of five elements

ii) Access set elements

iii) Update set by adding one element

iv) Remove one element from set.

d) Describe following Standard Packages

i) Numpy

ii) Pandas
a) What is the output of the following program?

dict1 = {‘Google’ : 1, ‘Facebook’ : 2, ‘Microsoft’ : 3}

dict2 = {‘GFG’ : 1, ‘Microsoft’ : 2, ‘Youtube’ : 3}

dict1⋅update(dict2);

for key, values in dictl⋅items( ):

print (key, values)

b) Write a python program that takes a number and checks whether it is a palindrome.

c) Write a python program to create a user defined module that will ask your program name and display
the name of the program.

d) List data types used in python. Explain any two with example.

a) Compare list and tuple (any four points).

b) Write a python program takes in a number and find the sum of digits in a number.

c) Write a program function that accepts a string and calculate the number of uppercase letters and
lower case letters.

d) Write a python program to create class student with roll-no and display its contents.

e) Explain following functions with example:

i) The open( ) function

ii) The write( ) function

winter 24

a) Explain decision making statements if-else, if-elif-else with example.

b) Describe any four methods of list in Python.

c) Write a program illustrating use of user defined package in Python.

d) Describe various modes of file object? Explain any two in detail

a) Explain identity and assignment operators with example.

b) How to create dictionary in Python? Write any three methods of dictionary.


c) Explain how to use user defined function in Python with example.

d) Describe the concept of inheritance in Python with example.

a) Explain loop control statement in Python.

b) Illustrate with example method overloading.

c) Write a Python program to check for zero division errors exception.

d) Write the output for the following if the variable fruit = ‘banana’.

>> fruit [:3]

>> fruit [3:]

>> fruit [3:3]

>> fruit [:]

e) Write a Python program to read contents from “a.txt” and write same contents in “b.txt”

You might also like