Q.
write a program to compute the total salary of the employees and calculate
the size of the binary file named '[Link]' . the file consists of the following
fields : employee number , basic salary and allowances.
Ans.
Output:
Q. write a menu-based program to add, delete and display the record of hostel
using list as stan structure in [Link] of hostel contains the fields: hostel
number, total students and total.
Ans.
Output:
[Link] a program to implement a stack for these book-details(book no,book
name). that is, now each item nide of the stack contains two types of
information – a book no. and its name. just implement PUSH and display
operations.
Ans.
Output:
Q. A list of numbers is used to populate the contents of a Stack using a function
push(Stack, data) where Stack is an empty list and data is the list of numbers.
The function should push all the numbers that are evento the Stack. Also write
the function pop() that removes the top element of the Stack on its each call.
Ans.
Output:
[Link] In ascending order using bubble sort.
Ans.
Output:
[Link] user defined functions to perform read and write operations onto
‘[Link]’ file having fields roll no. , name , sream and marks.
Ans.
Output:
Q. Write a menu-driven program to perform read and write operations using
text file '[Link]' containing student roll_no, name and address, using the
functions given below:
(i) student_record(filename)-Entering student details
While writing to a file ([Link]), roll_no field will be separated from the
remaining fields with a comma operator.
(ii) student_readdata (filename)-Display student details
(ii) student_search(filename)-Search a student on the basis of roll_no
Ans.
Output:
Q. Write a menu-driven program in Python that defines and calls the following
functions:
Insert(): To accept details of clock from the user and store it in CSV file
'[Link]'. Each record of clock contains following fields - ClockID, ClockName,
YearofManf, Price. Function takes details of all clocks and stores them in the file
in one go.
Delete(): To accept ClockID and remove the record with given ClockID from the
file '[Link]'. If ClockID is not found, then it should show a relevant message.
Before removing the record, it should print the record getting removed.
Ans.
Output:
[Link] to store students infor,ation like admission no. , name , class section
and percentage in a dictionary, and display information on the basis of
admission no.
Ans.
Output:
[Link] a text file line by line and display each word seperater by a #.
Ans.
Output:
[Link] a text file and display the no. of vowels/consonatns / uppercase/
lowercase/ characters in file.
Ans.
Output:
[Link] all the lines that contains the character ‘a’ in a file and write it to
another file.
Ans.
Output:
[Link] a binary file with name and roll no. search for a given roll no. and
display the name , if not found display appropriate message.
Output:
[Link] a binary file with roll no., marks and name. input a roll no. and update
the marks.
Ans.
Output:
[Link] a random number generator that generates random numbers between
1 and 6 (stimulates a dice).
Ans.
Output:
[Link] a python program to implement a stack using list.
Ans.
Output:
[Link] a CSV file by entering user-id and password, read and search the
password for given user-id.
Ans.
Output:
[Link] a python connectivity program to delete the employee record whose
name is read from the keyboard at execution time .
Ans.
Q. Write a Python code to delete all the records from employee table of those
whose age is greater than [Link] table has the following fields: Empid,
EmpName, Deptid, Age and Payscale.
Ans.
[Link] Infotech Pvt. Ltd. needs to store, retrieve and delete the records of its
employees. Develop an interface that provides front-end interaction through
Python, and stores and updates records using [Link] operations on MySQL
table "emp" involve reading, searching, updating and deleting the records of
employees.
(a) Program to read and fetch all the records from EMP table having salary
more than 70000.
Ans.
(b) program to update records of employees by increasing salary by rs.1000 of
all employees who are getting less than rs.80000
Ans.
(c)program to delete the record on the basis of inputted salary.
Ans.