0% found this document useful (0 votes)
53 views6 pages

Worksheet 12 QP

The document contains questions about MySQL, SQL commands, data structures, functions, and file handling in Python. It includes questions about the purpose of MySQL, different categories of SQL commands like DDL and DML, writing SQL queries to retrieve data from tables, creating and manipulating tables, functions in Python including parameters, return values, and scopes, linear and non-linear data structures like stacks and queues, and performing operations on files in Python like reading, writing, opening and closing files.

Uploaded by

tslingesswar
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)
53 views6 pages

Worksheet 12 QP

The document contains questions about MySQL, SQL commands, data structures, functions, and file handling in Python. It includes questions about the purpose of MySQL, different categories of SQL commands like DDL and DML, writing SQL queries to retrieve data from tables, creating and manipulating tables, functions in Python including parameters, return values, and scopes, linear and non-linear data structures like stacks and queues, and performing operations on files in Python like reading, writing, opening and closing files.

Uploaded by

tslingesswar
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/ 6

WORKSHEET – XII (1)

MYSQL
1) What is the purpose of using MySQL?
2) What is SQL? What are different categories of commands available in SQL?
3) Differentiate between DDL and DML commands.
4) Consider the following Table named “empl” and Write SQL commands from (a) to
(n)

(a)Display all the records from table empl.


(b)Display EmpNo and EName of all employees from the table empl.
(c) Display employee name, salary, and department number who are not getting
commission from table empl.
(d)Display employee number, name, sal*12 as Annual salary whose commission is
not NULL from table empl.
(e)List all department numbers from table empl.
(f) List all unique department numbers from table empl.
(g)List the details of all clerks who have not been assigned department as yet.
(h)Display the details of employees whose name have only four letters.
(i) Display the details of all employee whose annual salary is between 25000 to
40000.
(j) How many job types are offered to employees?
(k)List the employees who earn more commission than their salaries.
(l) Display name, job title and salary of employee who do not have manager.
(m) Display the name of employee whose name contains “A” as third letter.
(n) Display the name of employee whose name contains “L” as any letter.
WORKSHEET – XII (2)
MYSQL
1) Write SQL commands to perform the following tasks –
(a) Create table Employee with the following structure:

Ensure the following specification in created table:


ID should be declared as Primary Key
User_ID shold be unique
Salary Must be greater than 5000
First_Name and Lst_Name must not remain Blank
b) Show the structure of the table employee.
c) Insert 10 records into the table employee as well as Job.
d) For record with ID 4 update record with Last_Name, User_ID and Salary.
e) Add one new column in table Employee named “Phone”.
f) Delete the Employee record having First_Name as Manish.
g) Remove employee table permanently.
h) Count the total records in the table employee.
i) How will you enlist the name of tables in a database?
j) How to view the structures of the table made by you?
2) A table FLIGHT has 4 rows and 2 columns and another table AIR HOSTESS has 3
rows and 4 columns. How many rows and columns will be there if we obtain the
Cartesian product of these two tables?
3) Given two tables – Employee employee_id last_name first_name middle_name
marital_status PayTable employee_id salary department supervisor Find out the salary
taken by all KUMAR, i.e. all those who have their last_name as “KUMAR”
WORKSHEET – XII (3)
COMPUTER NETWORKS
1) Differentiate between Client and Server
2) How many types of Networks are there?
3) Differentiate between LAN and WAN?
4) What is P2P network?
5) What are the three wired types of network?
6) Name any 3 wireless computer networks
7) Explain the use of the following terms:
NIC,
MAC address,
WiFi Card,
Hub,
switch,
bridge,
router,
gateway,
access point
WORKSHEET – XII (4)
FUNCTIONS
1) Define a function?

2) Write a python function that takes two numbers and find their product.

3) Write a python function that takes two numbers and print the smaller number.

Also write how to call this function.

4) How many values a python function can return? Explain how?

5) Rewrite the correct code after removing the errors: -

def SI(p, t=2, r):


return (p*r*t)/100
6) Write a small python function that receive two numbers and return their sum,

product, difference and multiplication and modulo division.

7) What is scope of a variable?

8) Explain two types of variable scope with example.

9) Consider the following function headers. Identify the correct statement: -

a) def correct(a=1,b=2,c): b) def correct(a=1,b,c=3):

c) def correct(a=1,b=2,c=3): d) def correct(a=1,b,c):

10) Find the output of the following code: -

def CALLME(n1=1,n2=2):
n1=n1*n2
n2+=2
print(n1,n2)
CALLME()
CALLME(2,1)
CALLME(3)
WORKSHEET – XII (5)
DATA STRUCTURES

1) What do you mean by Data Structure?

2) How is Data Structure different from Data Type?

3) Define - Stack, Queue, Tree.

4) Name some linear and non-linear data structures.

5) Name some operations commonly performed on data structures?

6) What is a list?

7) What is traversing? Write python code to traverse a list.

8) Name the methods used for inserting and deleting elements from a list.

9) What is a stack ? what basic operation can be performed on them?

10) What are Application of Stack?


WORKSHEET – XII (6)
FILE HANDLING

1) What is a data file in python?

2) Differentiate between a text file and a binary file.

3) What is the significance of a file object or a file handle?

4) What is the use of flush( )?

5) Name the methods used for reading and writing data from text file.

6) What are the various file opening modes?

7) What is the significance of close( )?

8) Write a python code to write some text to a file Lines.txt.

9) Write a python code to find the size of the file in bytes, number of lines and

number of words.

10) What does stdin, stdout represent?

You might also like