0% found this document useful (0 votes)
5 views38 pages

Questions

Uploaded by

Pankaj Arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views38 pages

Questions

Uploaded by

Pankaj Arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

CRESCENT PUBLIC

SCHOOL

th
11 IP
Practical File
Made By: Naman bansal
Roll No.___________
Teacher’s Name_______________

Saraswati Vihar, Parwana Rd, opp. Sharda


Niketan, Pitam Pura, New Delhi, Delhi 110034
Index
Q1 Write a program to check whether a person is eligible for vote or not...............4
Q2 Write a program to check whether a given number is negative, positive or zero.
................................................................................................................................... 5
Q3 Write a program to accept marks from user and display whether he/she is Pass
or Fail......................................................................................................................... 6
Q4 Write a program to display area of rectangle......................................................7
Q5 Write a program to display numbers up to N......................................................8
Q6 Write a program to display the factorial of a number..........................................9
Q7 Write a program to display an example of list slicing.......................................10
Q8 Write a program to display list after deleting even values................................11
Q9 Write a program to increase all the values of list by 10....................................12
Q11 Write a program to display average of list......................................................13
Q12 Write a program to calculate sale price after discount....................................14
Q13 Write a program to display Profit or Loss.......................................................15
Q14 Write a program to display sum of squares of all the numbers up to N.
................................................................................................................. 16
Q15 Write a program to display states and their capitals using dictionary. 17 Q16
Write a program to display simple interest and compound interest........................19
Q17 Write a program to display hike of fees by 10%.............................................20
Q18 Write a program to check whether a given year Leap or not..........................21
Q19 Write a program to display area and perimeter of Circle................................22
Q20 Write a program to check whether a given number is perfect or not. 23
Q21 Write a program to merger two lists using arithmetic operator.......................24
Q22 Write a program to repeat list using arithmetic operator.................................25
Q23 Write a program to count total even and odd values from list........................26
Q24 Write a program to replace negative values with -1 and positive values with 1.
................................................................................................................................. 27
Q25 Write a program to search a given number in list...........................................28
Q26 Write a program to find the largest number from list......................................29
Q27 Write a program to search and remove number from list...............................30
Q28 Write a program to create phone directory......................................................31
Q29 Write a query to create database Employee....................................................32
Q30 Write a query to open database Employee......................................................32
Q31 Write a query to create table Empl..................................................................32
Q32 Write a query to display structure of table Empl............................................33
Q33 Write a query to insert details of 10 Empl.......................................................34
Q34 Write a query to display details of all the Empl..............................................34
Q35 Write a query to display EmpNo and EName of all the Employees from the
table empl................................................................................................................ 35
Q36 Display the details of employees whose name have only four letters.35
Q37 Display the details of all employee whose annual salary between 25000 to
40000....................................................................................................................... 36
Q38 Display name, job title and salary of employee who do not have a manager..36
Q39 Display name of employee whose name contains "A" as third letter. 37
Q40 Display the name of employee whose name contains "L" as any letter.
................................................................................................................. 37
Q41 Display the name of departments. Each department should be displayed once.
................................................................................................................................. 38
Q1 Write a program to check whether a person is eligible for vote or not. Code:

Output:
Q2 Write a program to check whether a given number is negative, positive or zero.
Code:

Output:
Q3 Write a program to accept marks from user and display whether he/she is Pass
or Fail.
Code:

Output:
Q4 Write a program to display area of
rectangle.

Output:
Q5 Write a program to display numbers up to
N.

Output:
Q6 Write a program to display the factorial of a
number.

Output:
Q7 Write a program to display an example of list
slicing.

Output:
Q8 Write a program to display list after deleting even
values.

Output:
Q9 Write a program to increase all the values of list by
10.

Output:
Q11 Write a program to display average of
list.

Output:
Q12 Write a program to calculate sale price after
discount.

Output:
Q13 Write a program to display Profit or
Loss.

Output:
Q14 Write a program to display sum of squares of all the numbers up
N.
Code:

Output:
Q15 Write a program to display states and their capitals using
Code:

Output:
Q16 Write a program to display simple interest and compound
interest.

Output:
Q17 Write a program to display hike of fees by
10%.

Output:
Q18 Write a program to check whether a given year Leap or
not.

Output:
Q19 Write a program to display area and perimeter of
Circle.

Output:
Q20 Write a program to check whether a given number is perfect or
not.

Output:
Q21 Write a program to merger two lists using arithmetic
operator.

Output:
Q22 Write a program to repeat list using arithmetic
operator.

Output:
Q23 Write a program to count total even and odd values from
list.

Output:
Q24 Write a program to replace negative values with -1 and
values with 1.
Code:

Output:
Q25 Write a program to search a given number in
list.

Output:
Q26 Write a program to find the largest number from
list.

Output:
Q27 Write a program to search and remove number from
list.

Output:
Q28 Write a program to create phone
directory.

Output:
Q29 Write a query to create database
Employee.

Q30 Write a query to open database Employee.


Use Employee;

Q31 Write a query to create table Empl.


Create Table Empl (
EmpNo int,
EName varchar(20),
Job varchar(20), Mgr
char(4), HireDate
date,
Sal decimal(10,0), Comm
decimal(10,0), Deptno
char(2)
);
Q32 Write a query to display structure of table Empl.
Describe Empl;
OR
Desc Empl;
Q33 Write a query to insert details of 10 Empl.
insert into Empl values
(8521, 'seth', 'salesman' ,8698, '1991-02-22' ,1256.00, 500.00 , 30),
(8566, 'mahadeval', 'manager' ,8839, '1991-04-02' ,2985.00, null , 20),
(8654, 'momin', 'salesman' ,8698, '1991-09-28' ,1250.00, 1400.00,30),
(8698, 'bina', 'manager' ,8839, '1991-05-11' ,2850.00, null ,30),
(8882, 'shaivnsh', 'manager' ,8839, '1991-06-09' ,2450.00, null ,10),
(8888, 'scott', 'analyst' ,8566, '1992-12-09' ,3000.00, null , 20),
(8839, 'amir', 'president' , null, '1991-11-18' ,5000.00, null ,10),
(8844, 'kuldeep', 'salesman' , 8698, '1991-09-08' ,159.00, 0.00 ,30);

Q34 Write a query to display details of all the Empl.


Select * from Empl;
Q35 Write a query to display EmpNo and EName of all the
from the table empl.
Select EmpNo, EName from Empl;

Q36 Display the details of employees whose name have only four letters.
Select * from Empl where EName like ‘ ’;
Q37 Display the details of all employee whose annual salary
25000 to 40000.
Select * from Empl where Sal*12 between 25000 and 40000;

Q38 Display name, job title and salary of employee who do not have a
manager.
Select EName,Job,Sal from Empl where Job not like “Manager”;
Q39 Display name of employee whose name contains "A" as third
Select EName from Empl where EName like ‘ A%’;

Q40 Display the name of employee whose name contains "L" as any
letter.
Select EName from Empl where EName like '%l%';
Q41 Display the name of departments. Each department should
displayed once.
Select Distinct(Deptno) from Empl;

You might also like