Python :
Q1) Write a python program that defines functions create() and VowelCount() in Python, which
should read each character of a text file MY_TEXT_FILE.TXT, should count and display the
occurrence of alphabets vowels.
Q2) Write a menu-driven Program to create a binary file with name, roll number and percentage.
Search for a given roll number and display the name, if not found display appropriate message.
Q3) Write a menu driven program to do the following in a csv file ([Link]) which contain the
details of Employee (ID, Name, Designation, Salary)
i. Accept ‘n’ records
ii. Search for an employee based on ID and display the details of the employee
Q4)
a) Write python program that defines functions to create a text file and display those words, which
are less than 5 characters.
b) Write python program that defines functions to create a text file and remove all the lines that
contain the character `a’ in a file and write it to another file.
Q5) A binary file “[Link]” has structure as [ Code, Description, Price ]
i. Write a user defined function create( ) to input multiple items from the user and add to
[Link]
ii. Write a function SearchRec() in Python which will accept the code as parameter and
search and display the details of the corresponding code on screen from [Link].
Q6) Write a menu-driven Python program to perform the following operations on a CSV file [Link]
which stores user credentials as user_id,password:
(a) Insert a new record.
(b) Display all records.
(c) Search for a password using a given user_id and display it, or print “User not found”.
(d) Exit.
SQL
Q1) Observe the following tables CLUB & STUDENT and answer the queries given below
Table: CLUB
Table :STUDENT
Query 1: Increase the salary of coaches to 1000 whose sport is ‘swimming’.
Query 2: Display the details of the coach's name starting with ‘K’.
Query 3: To display the total payment and number of coaches in each sport.
Query 4: Display the Student’s Record who has a Female coach and sport is
Karate.
Q2) Observe the following tables Students & Stu_Marks and answer the queries given below:
Query 1: Write a Query to change the fees of Student to 170 whose Roll number is 1,
if the existing fees is less than 130.
Query 2: Write Query to display the list of student names whose Term Exam Marks
are above 350.
Query 3: Write a Query to list the names of female students in the Hindi
Department.
Query 4: Write a Query to list name of the students whose ages are between 18 to 20
Q3) Observe the following tables Faculty and Course and write queries given below:
Table:Course
Query 1: To display details of those Faculties whose salary is greater than 12000.
Query 2: To display the details of courses whose fees is in the range of 15000 to
50000 (both values included)
Query 3: To display details of those courses which are taught by ‘Sulekha’ in
descending order of courses.
Query 4: To increase the fees of all courses by 500 of “System Design” courses.
Q4) Observe the following tables and write queries given below:
Table:Stocks
Query 1: Write a Query to find the Total Price for each Item.[Total Price=Qty * UnitPrice]
Query 2: Write a Query To display maximum unit price of products for each
dealer individually as per Dcode from the table Stock.
Query 3: Write a Query to display the Pname and Dname from table stock and dealers.
Query 4: Write a Query to display details of all products in the stock table in
descending order of Stock date.
Q5) Observe the following tables and write queries given below:
Table: School
Table:Admin
Query 1: Write a Query to display the records of Teachers whose periods are more than 25.
Query 2: Write a Query to display DESIGNATION without duplicate entries from the table ADMIN
Query 3: Write a Query to display TEACHER NAME, CODE and corresponding DESIGNATION
from tables SCHOOL and ADMIN of Male teachers.
Query 4: Write a Query to display the details of Teachers who joined between March 10,2000 and
July 17,2000
Q6) Observe the following tables and write queries given below:
Table:Customer
Table:Orders
Query 1: Write a Query to display CustomerID, CustomerName and bill amount for customers
belonging to Ahmedabad.
Query 2: Write a Query to Display the order details in descending order of amount.
Query 3: Write a Query to Display OrderId, Orderdate , customer name and mobile no of customers
whose name ends with ‘k’ and name contains letter ‘h.
Query 4: Write a Query to display display the sum of order amount for each city.