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

PWP Assignment

The document outlines a comprehensive curriculum for learning Python, covering various topics such as basic types, operators, control flow statements, data structures, functions, modules, object-oriented programming, and file handling. It includes specific programming tasks and exercises for each unit to reinforce learning and practical application of Python concepts. The curriculum is structured into six units, each focusing on different aspects of Python programming.

Uploaded by

Shrish Rajankar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

PWP Assignment

The document outlines a comprehensive curriculum for learning Python, covering various topics such as basic types, operators, control flow statements, data structures, functions, modules, object-oriented programming, and file handling. It includes specific programming tasks and exercises for each unit to reinforce learning and practical application of Python concepts. The curriculum is structured into six units, each focusing on different aspects of Python programming.

Uploaded by

Shrish Rajankar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Unit 1 introduction and syntax of python program.

1. Write python program to demonstrate basic types in Python


Unit 2 Python Operators and Control Flow statements
2. Write a program to check a person is eligible for vote or not.
3. Write a program to print largest of 3 numbers using if condition
4. Write a program to Print even numbers above 50 and its submission.
5. Write a program to check whether a number is palindrome or not using while
loop.
6. Write a program to find the best of 2 test average marks out of three test
marks accepted by user.
7. Write a python program to display the table of a number using while loop.
8. Write a pythonprogram to display the letter F in star pattern.
9. Write a python program to display only odd numbers in the list
[20,11,9,66,89,44] using continue.
10. Writer pattern program to find Armstrong number between a range.
11. Write a Python program to check whether the given number is prime or not.
12. Write a Python program to ask user for an integer and create a list that
consists factorials of that integer.
13. Write a python program that performs addition of two square matrix.
14. Write a Python program that performs multiplication of two square matrix.
15. write the Python program to convert meters to centimeter inch and yards.
16. write a Python program to calculate electric bill :
a) for the first 50 unit rupees 0.50 per unit
b) for the next 100 units rupees 0.75 per unit
c) for the next 100 units rupees 1.25 per unit
d) for unit about 250 rupees 1.50 per unit
e) An addition surcharge of 17% is added to the bill
f)
Unit 3 data structure in python
1. Write a program which performs following operation on the list using built in
function.
a) update elements of the list
b) concatenation of list
c) check for member in the list
d) insert into a list
e) sum the element of the list
f) push and pop the elements of the list
g) Sort the list
h) find the biggest and smallest element in the list
i) display the list into the reverse order

2. Create a list name num to value[0 to 11] For the given list write the output:
a) >>>num[1:10:2]
b) >>>num[10:]
c) >>>num[0::2]
d) open all the multiples of iii from the list num

3. Given list primes = [2,3,5,7,11,13,17,19,23,29].


Obtain the primes less than 10 from the list prime.

4. Explain the list operations


5. Write a Python program that generates a list of 20 random numbers between
1 and 100.
6. Write function dups to find all duplicates in the list. take the value of list from
user.
7. Write a function unique to find all unique elements of the list take the values
of list from user.
8. Write a Python program that generates a list of 20 random numbers between
1 and 100.
a) Print the list
b) print the average of elements in the list
c) print the largest and smallest value in the list
d) print the second largest and 2nd smallest entries in the list.
e) How many even numbers are in the list

9. Write a Python program to check whether a specific item is present in tuple or


not
10. Write a python script to perform following operations:
a) Find a repeated items in Tuple take the values from the user in Tuple
b) Find a common items from the two tables

11. write the Python program to find the index of maximum and minimum value
in the tuple.
12. Write the Python program to count the numbers of each characters in the
given string and store them in the dictionary data structure.
13. Write a python program to check for the values of existing key in the
dictionary continue the process in the user’s enter small Y and Capital Y.
14. Write a Python program to count unique items in tuple.
15. Write a python program to count the frequency of elements in the list using
the dictionary.
16. Write a pattern program that demonstrates use of python string operators.
17. Explain the slicing on the string.
18. Write python program by using these all set comparison operators
== , != , >= , <=
19. Write output for following
>>> a = {1,2,3,4}
>>> b = {4,5,6}
>>> c = a | b
>>> print(c)
>>> d = a & b
>>>print(d)
>>>e = a - b
>>>print(e)
>>>f = a ^ b
>>>print(f)
>>>print(a.isdisjoint(b))
>>>print(a.symmetric_differ(b))
>>>print(a.intersection_update(b))
>>>print(a.summetric_difference-update(b))

Unit 4 functions modules packages module 4 modular programming

1. Write a function to find factorial of the number?


2. Write a function to find the maximum element from the list without using
max function ?
3. What type of parameter passing is used in python justify your answer with
example.
4. What is the actual and formal parameter explain the difference along with an
example.
5. Write a function in python to display multiples of 5 up to 100.
6. Explain the scope of variables
7. How to create a module and use it in the python program explain with the
example
8. Define module and give advantages of using model
9. Write python program using modul to perform operation addition,
subtraction, multiplication, division.
10. Write a python program to find factorial of number take number using
command line argument.
11. write the Python script for adding two numbers and the numbers are passed
as command line argument.
12. Create a python program to print given string in uppercase using lambda
function.
13. write a function called is_sorted that is given a list and returns true if the list
is sorted false otherwise.
14. Write a function called number_of_factors that takes an integer and returns
how many factors the number has.
15. Write a Python program that calculates the following:
a) area of circle
b) circumference of circle
c) area of rectangle
d) parameter of rectangle

Unit 5 object oriented programming in python

1. Difference between class variable and instance variable


2. Write a Python class named Circle constructed by radius and two methods
which will compute the area and the parameter of the circle. Create a Python
class named Rectangle constructed by length and width and a method which
will compute the area of rectangle.
3. Write the Python program to stimulate the banking operation using class.
4. Write a Python program demonstrate the queue/ stack operations using class
5. write the Python program to add some days to the present date and printed
date added.
6. Write a python program to find sum of 2 numbers using class and models.
7. Write the Python program to add 3 subject Marks and display pass or fail
using class and object.
8. create respective models for each of the operations and call them separately
using menu-driven program.
9. Write a function reverse to reverse a list without using the reverse function.
10. Write a program using function and a while loop that asks the user for a
number and prints a countdown from the number to 0.
11. Using a number module create an array and check the following:
a) Type of array
b) Axes of array
c) Shape of array
d) Type of elements in array

Unit 6 Files I/O Handling and Exception Handling


1. Write the Python program to open and write “hello world” into the file
2. Write Python program to write content Python programming for the existing
file.

You might also like