0% found this document useful (0 votes)
26 views3 pages

Adobe Scan Nov 06, 2023

This document contains 19 questions related to computer science concepts and SQL queries. The questions cover topics like file handling in Python, arithmetic operations using functions, CSV and binary file handling, Fibonacci series, simple and compound interest calculations, stack operations, creating and querying SQL databases and tables. Some example queries listed are to create and select from databases and tables, insert, update, delete and modify data.

Uploaded by

mf885825
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)
26 views3 pages

Adobe Scan Nov 06, 2023

This document contains 19 questions related to computer science concepts and SQL queries. The questions cover topics like file handling in Python, arithmetic operations using functions, CSV and binary file handling, Fibonacci series, simple and compound interest calculations, stack operations, creating and querying SQL databases and tables. Some example queries listed are to create and select from databases and tables, insert, update, delete and modify data.

Uploaded by

mf885825
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/ 3

COMPUTER SCIENCE (083)

QUESTIONS FOR PRACTICAL FILE/ REPORT FILE

1 Read a text file line by line and display each word separated by a '#.
Read a text file and display the number of vowels/consonants/uppercase/lowercase
2
characters in the file.
another file.
3 Remove all the line that contain the character 'a' in a file and write it to
/) based on the user's
4. Write a menudriven program to perform arithmeticoperation (+,-,*,
choice.
update the
5. Create a binary file with roll number, name and marks, Input a roll numberand
marks.
given
6. Create a CSV file by entering user-id and password, read and search the password for
user-id.
16 (simulates
7. Write a random number generator that generates random numbers between
a dice).
8. Write a function that receive two string, arguments and check whether they are of same
length string (return True in this case otherwise False).
9. Write a python program to display Fibonacci series up to n' numbers.
10. Write a python program to calculate simple interest and compound interest using a
function.
11. Write afunction in python that counts the number of 'ME' or MY words present in a text
file. "Story.txt". If the "Story\.txt" contents are as follows- My first book was 'ME and MY
Family'. It gave me the chance to be known to the world.
12. Write aprogram to create a cSV file to store student data (RollNo., Name, Marks). Obtain
data from user and write 5 records into the file.
13. Write aprogram to a binary file called emp.dat and write into it the employee details of
some employees, available in the form of dictionaries.
14. Write a program to get data (roll no., name and marks) from the user and write onto a
binary file. The program should be able to get data from the user and write onto the file as
long as the user wants.
15. Create apython program to implement stack operations.
16. Towrite Queries for the following Questions based on the given table.
TABLE: Info
Rollno Name Gender Age Dept DOA Fees
1, Arun M 24 Computer 1997-01-10 120
2. Ankit M 21 History 1998-03-24 200
3 Anu 20 Hindi 1996-12-12 300
4. Bala 19 NULL 1999-07-01 400
5. Charan M 18 Hindi 1997-06-27 250
6. Deepa F 19 History 1997-02-25 300
7 Dinesh M 22 Computer 1997-06-27 210
Usha 23 NULL 1997-07-31 200

a) Write a Query to createa new database in the name of "STUDENTS".


b) Write a Query to open the database "STUDENTS".
c) Write a Query to create the above table called: Info
d) Write aQuery to list all the existing database names.
e) Write aQuery to list all the tables that exists in the current database.
f) Write a Query to insert all the rows of above table into info table.
8) Write aQuery to display all the details of students from the above table 'Info'.
h) Write aQuery to display Rollno, Name and Department of the students from Info
table.
17. To write Queries for the following Questions based on the given table:
TABLE: Info
Name Gender Age Dept DOA Fees
Rollno
Arun M 24 Computer 1997-01-10 120
1.
Ankit M 21 History 1998-03-24 200
2.
F 20 Hindi 1996-12-12 300
3. Anu
M 19 NULL 1999-07-01 400
Bala
M 18 Hindi 1997-06-27 250
5. Charan
F 19 History 1997-02-25 300
6. Deepa
M 22 Computer 1997-06-27 210
7. Dinesh
23 NULL 1997-07-31 200
8. Usha F

from lnfo table.


a) Write aQuery to select distinct Department
department.
b) To show all information about students of History
Hindi Department.
c) Write a Query to list name of female students in
whose age are between 18 to 20.
d) Write a Query to list name of the students
students whose name is starting with 'A.
e) Write a Query to display the name of the
students whose name have second
f) Write a Query to list the names of those
alphabet n' in their names.
18. Towrite Queries for the following Questions based on the given table:
TABLE: Info
DOA Fees
Rollno Name Gender Age Dept
Computer 1997-01-10 120
1. Arun M 24
1998-03-24 200
2. Ankit M 21 History
20 Hindi 1996-12-12 300
3 Anu
19 NULL 1999-07-01 400
4 Bala
18 Hindi 1997-06-27 250
5 Charan M
19 History 1997-02-25 300
6. Deepa F
22 Computer 1997-06-27 210
7 Dinesh M
23 NULL 1997-07-31 200
Usha F

number is 8.
a) Write a Query to delete the details of Roll
whose Roll number is 1, if the
b) Write a Query to change the fees of Students to 17O
existing fees is less than 130.
in table Info.
c) Write a Query to add a new column Area of type varchar
Area Contains NULL.
d) Write a Query to display Name of allstudents whose
table Info.
e) Write a Query to delete Area Column from the
database.
f) Write a Query to delete table from
table:
19. To write Queries for the following Questions based on the given
Table : STOCK
itemNo item Dcode Qty UnitPrice StockDate
Ball Pen 0.5 102 100 16 31-03-10
5005
Ball Pen 0.25 102 150 20 01-01-10
5003
Gel Pen Premium 101 125 14 14-02-10
5002
Gel Pen Classic 101 200 22 01-01-09
5006
Eraser Small 102 210 5 19-03-09
5001
102 60 10 12-12-09
5004 Eraser Big
Sharpener Classic 103 160 8 23-01-09
5009
Table: DELERS

Dcode Dname
101 Reliable Staioners
103 Classic Plastic
102 Clear Deals
a) To display the total Unit price of allthe
products whose Dcode as 102.
b) To display details of all products in the stock in
descending order of Stock date.
c) To display maximum unit price of products for each dealer
from the table Stock.
individually as per Dcode
d) To display the Pname and Dname from table stock and
dealers.
20. Write Queries for the following Questions basedon
the given table empl:
EMPNO ENAME JOB MGR DEPTNO
HIREDATE SAL COMM
8369 Smith Clerk 20
8902 1990-12-18 800 NULL
8499 Anya Salesman 8698 1991-02-20 1600 300 30
8521 Seth Salesman 8698 1250 500 30
1991-02-22
8566 Mahadevan Manager 8839 1991-04-02 2985 NULL 20
8654 Momin Salesman 8698 1991-09-28 1250 1400 30
8698 Bina 30
Manager 8839 1991-05-01 2850 NULL
8839 Amir President 1991-11-18 5000 NULL 10
8844
Kuldeep Salesman 8698 1991-09-08 1500 30
8882 Shivansh Manager 8839 1991-06-09 2450 NULL 10
8886 Anoop Clerk 8888 1993-01-12 1100 NULL 20
8900 Jatin Clerk 8698 1991-12-03 950 NULL 30
8902 Fakir Analyst 8566 1991-12-03 3000 NULL 20
8934 Mita Clerk 8882 1992-01-23 1300 NULL 10

a) Write aquery to calculate average salary of all employees listed in table empl.
b) Write a queryto count number of records in table empl.
c) Write a query to count number of jobs in table empl.
d) Writea query to find how many distinct jobs are listed in table empl.
e) Write a query to display maximum salary from table empl.
f) Write a query display the joining date of senior most employee.
g) Write aquery to display total salary of all employees listed in empl.
21. Creating a python program to integrate MySQL with Python (updating records).
22. Program to connect with database and delete the endeared empno.
23. Creating a python program to integrate MySQL with python (inserting records and displaying
records).
24. Creating apython program to integrate MySQL with python (searching and displaying
records).

Clas-X(A

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy