Professional Documents
Culture Documents
Document 4
Document 4
Document 4
NO PROGRAM SIGN
21 Write a function in python named POP(STACK) where STACK is
a stack implemented by a list of numbers. The function will
display the popped element after function call.
22 Write a function AddCustomer(Customer) in Python to add a
new Customer information NAME into the List of CStack and
display the information.
23 Write a function DeleteCustomer() to delete a Customer
information from a list of CStack. The function delete the name
of customer from the stack.
24 Write the SQL statement to create EMPLOYEE relation which
contains EMPNO, Name, Skill, PayRate.
25 Create a table with the under mentioned structure (Table
name is DEPT) DeptNo NUMBER(2)
DeptName CHAR(12)
Location CHAR(12)
26 Create a table called SALGRADE with the columns specified
below:
LowSal NUMBER(7,2)
HighSal NUMBER(7,2)
Grade NUMBER(2)
27 Create a table called PROJECT with the columns specified
below
ProjId NUMBER(4)
ProjDesig CHAR(20)
ProjStartDT DATE
ProjEndDT DATE
BudgetAmount NUMBER(7)
MaxNoStaff NUMBER(2)
28 Insert a record with suitable data in the table EMP, having
system date as the Hiredate
29 WAP To create database (MySQL connectivity)
30 WAP To show database (MySQL connectivity
31 WAP To update record in Table Student (MySQL connectivity)
32 WAP To describe structure of table student (MySQL
connectivity)
Q21.Write a function in python named POP(STACK) where STACK is a stack
implemented by a list of numbers. The function will display the popped element
after function call
def POP(STACK):
if STACK==[]:
def PUSH(STACK,SET):
for i in SET:
if i%2==0:
STACK.append(i)
print(STACK)
Q25.Create a table with the under mentioned structure (Table name is DEPT)
DeptNo NUMBER(2)
DeptName CHAR(12)
Location CHAR(12)
CREATE TABLE Dept ( DeptNo NUMBER(2) NOT NULL PRIMARY KEY, DeptName
CHAR(12), Location CHAR(12);
Q26.Create a table called SALGRADE with the columns specified below:
LowSal NUMBER(7,2)
HighSal NUMBER(7,2)
Grade NUMBER(2)
CREATE TABLE Salgrade (LowSal Decimal(7,2), HighSal DECIMAL(7,2), Grade
NUMBER(2) );
Q28.Insert a record with suitable data in the table EMP, having system date as the
Hiredate
INSERT INTO Emp VALUES (3008, 18, “XAVIER”, “Manager”, Date( ), 3250, NULL);