Professional Documents
Culture Documents
Mikumiku
Mikumiku
Practical Ex.-3
Write a program to check whether a given string is a palindrome or not in using the user defined
functions in python.
Program:
Output:
4
Practical Ex.-4
Write a menu driven program in python that has two functions: sign-in and sign-up allows the user to
create an id with username and password, sign-in checks whether the username and password matches.
Program:
Output:
5
Practical Ex. – 5
Write a program that could read a text file and print the count of each values(lower and upper both)
present in the text file . the program would also mention the total no. of words in the text file.
Program:
Output:
6
Practical Ex.-6
Write a program to read following details of a student's marks details(roll no., name, english, maths, cs)
and store it into a .csv file delimited with tab.
Program:
Output:
7
Practical Ex.-7
Write a program to get student data(roll no., name and marks) from user and write onto a binary file.
The program should be able to get data from user and write onto the file as long as the user wants.
Program:
Output:
Binary file:
8
Practical Ex.-8
Write a program that copies a text file “source.txt” onto “target.txt” barring the lines starting with a “@”
sign.
Source File:
Program:
Target file:
9
Practical Ex.-9
Program:
10
Output:
11
Practical Ex.-10
Write a python program that reverses the given string using the principles of stack.
Program:
Output:
12
Practical Ex.-11
Write a python program to convert infix expression to postfix expression using stack
principles.
Program:
Output:
13
Practical Ex.-12
Write a function in Python, Push (SItem) where, SItem is a dictionary containing the
details of stationary items – {Sname: price}. The function should push the names of
those items in the stack who have price greater than 75. Also display the count of
elements pushed into the stack.
Program:
Output: