0% found this document useful (0 votes)
103 views5 pages

PPS Programs for END SEM on Unit(3,4,5,6)

Pps all programs with solution

Uploaded by

darklover4545
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)
103 views5 pages

PPS Programs for END SEM on Unit(3,4,5,6)

Pps all programs with solution

Uploaded by

darklover4545
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/ 5

D Y Patil College of Engineering Akurdi Pune 44

Department of First Year Engineering


Pattern: F.E. (2019)
Subject: Programming and Problem Solving (PPS)
Python Programs on (Unit 3, 4, 5, & 6) and Case Study Examples

Unit 3: Functions and Modules

(Note: All programs should be write using function.)

1. Write a python program to calculate area of rectangle using


function. Make use of parameter passing technique.
2. Write a python program to calculate square of a given number using
function.
3. Write a python program to swap two numbers using function.
4. Write a python program to check whether the given number is even
or odd using function.
5. Write a python program to test whether the year is leap or not using
function.
6. Write a python program to compute area of circle using function and
a return statement.
7. Write a python program to check the number is prime or not.
8. Write a python program for recursive factorial function.
9. Write a python program to display the Fibonacci series upto n
numbers using recursion.
Unit 4: String
1. Write a python program to concatenate two strings
2. Write a python program to display the name of the student, his
course and age.
3. Write a python program to remove nth index character from non
empty string.
4. Write a python program to change a given string to a new string
where first and last characters have been exchanged.
5. Write a python program to traverse through string using while
loop.
6. Write a python program to traverse through string using for loop.
7. Write a python program to display how many times particular
letter appears in the string.
8. Write a python program to find the length of a string.
9. Write a python program to count occurrence of each word in
given sentence.
10. Write a python program to copy one string to another.
11. Write a python program to check if a substring is present in
the given string or not.
12. Write a python program to count number of digits and letters
in a string
13. Write a python program to count number of vowels in a string.
14. Write a python program to check if the string is palindrome or
not.
15. Write a python program to sort the word in a sentence in an
alphabetic order.

Unit 5: Object Oriented Programing

1. Write a python program to display student information using class


method.
2. Write a python program that uses classes to store exam number and
marks of four subjects. Use list to store the marks off four subjects.
3. Write a python program to create class car with two attributes name
and cost. Create two objects and display information.

Unit 6: File Handling and Dictionaries

1. Write a python program to display the values of file object attributes.


2. Write a python program to read the contents of the file named
‘text.txt’.
3. Write a python program to read and display first two lines of the text
file.
4. Write a python program to display the contents of the file using for
loop.
5. Write a python program to split the text line written in the file into
words.
6. Write a python program to write multiple lines to a text file using
writelines() method.
7. Write a python program to write n number of lines to the file and
display all these lines as output.
8. Write a python program to write the contents in ‘one.txt’ file. Read
these contents and write them to another file named ‘two.txt’
9. Write a python program to open a file and counts the frequency of
each word.
10. Write a python program to count number of vowels and
consonants present in the text file.
11. Write a python program to count total number of lines in a file.
12. Write a python program to count the total number of words in
a file.
13. Write a python program to count the total number of characters
in a file.
14. Write a python program to count the total number of blank
spaces in a file.
15. Write a python program to write the contents of one file to
another file from end.
Case Study Programs

(As per last year papers 1 program may be ask for case study)

1. Write a python program for creating simple calculator using


function.
2. Create class EMPLOYEE for storing details (Name, Designation,
Gender, Date_of_Joining, and Salary). Define function members to
compute
a) total number of employee in an organization
b) Count of male and female employee
c) Employee with salary more than 10,000
d) Employee with designation “Asst Manager”
3. Create a class STORE to keep track of Products (Product Code,
Name and Price). Display menu of all products to user. Generate bill
as per order.

You might also like