0% found this document useful (0 votes)
27 views48 pages

Practical File CS 2024 25 (Word)

The document outlines various practical exercises for a Class 12 Computer Science course, including creating menu-driven programs for arithmetic operations, list manipulation, string operations, grade calculation using dictionaries, and file handling in Python. Each exercise includes the aim, source code, and sample outputs demonstrating the functionality of the programs. The exercises cover a range of topics such as functions, loops, conditionals, and data structures.

Uploaded by

Sanchay 16
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)
27 views48 pages

Practical File CS 2024 25 (Word)

The document outlines various practical exercises for a Class 12 Computer Science course, including creating menu-driven programs for arithmetic operations, list manipulation, string operations, grade calculation using dictionaries, and file handling in Python. Each exercise includes the aim, source code, and sample outputs demonstrating the functionality of the programs. The exercises cover a range of topics such as functions, loops, conditionals, and data structures.

Uploaded by

Sanchay 16
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/ 48

VELAMMAL VIDHYASHRAM

SSCE 2024-2025 CLASS 12 COMPUER SCIENCE


PRACTICAL FILE
EX.NO.1
DATE:

Creating a Menu driven program to perform Arithmetic operations.


AIM:
To write a menu driven python program to perform Arithmetic operations based on the
user’s choice.
SOURCE CODE:
def addition(a, b):
sum = a + b
print(a, "+", b, "=", sum)
def subtraction(a, b):
difference = a - b
print(a, "-", b, "=", difference)
def multiplication(a, b):
product = a * b
print(a, "*", b, "=", product)
def divide(a, b):
quotient = a / b
remainder = a % b
print("Quotient of", a, "/", b, "=", quotient)
print("Remainder of", a, "%", b, "=", remainder)
print("WELCOME TO CALCULATOR")
while True:
print("\nChoose the operation to perform:")
print("1. Addition of two numbers")
print("2. Subtraction of two numbers")
print("3. Multiplication of two numbers")
print("4. Division of two numbers")
print("5. Exit")
choice = int(input("\nEnter your Choice: "))
if choice == 1:
print("\nAddition of two numbers")
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
addition(a,b)
elif choice == 2:
print("\nSubtraction of two numbers")
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
subtraction(a,b)
elif choice == 3:
print("\nMultiplication of two numbers")
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
multiplication(a,b)
elif choice == 4:
print("\nDivision of two numbers")
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
divide(a,b)
elif choice == 5:
print("Thank You! yes.")
break
else:
print("Invalid Input! Please, try again.")
SAMPLE OUTPUT
WELCOME TO CALCULATOR

Choose the operation to perform:


1. Addition of two numbers
2. Subtraction of two numbers
3. Multiplication of two numbers
4. Division of two numbers
5. Exit

Enter your Choice: 1

Addition of two numbers


Enter the first number: 5
Enter the second number: 5
5 + 5 = 10

Choose the operation to perform:


1. Addition of two numbers
2. Subtraction of two numbers
3. Multiplication of two numbers
4. Division of two numbers
5. Exit

Enter your Choice: 2


Subtraction of two numbers
Enter the first number: 5
Enter the second number: 5
5-5=0

Choose the operation to perform:


1. Addition of two numbers
2. Subtraction of two numbers
3. Multiplication of two numbers
4. Division of two numbers
5. Exit
Enter your Choice: 3

Multiplication of two numbers


Enter the first number: 5
Enter the second number: 5
5 * 5 = 25
Choose the operation to perform:
1. Addition of two numbers
2. Subtraction of two numbers
3. Multiplication of two numbers
4. Division of two numbers
5. Exit
Enter your Choice: 4
Division of two numbers
Enter the first number: 25
Enter the second number: 5
Quotient of 25 / 5 = 5.0
Remainder of 25 % 5 = 0
Choose the operation to perform:
1. Addition of two numbers
2. Subtraction of two numbers
3. Multiplication of two numbers
4. Division of two numbers
5. Exit

Enter your Choice: 5


Thank You! Bye.

Result:

The above output has been verified in the terminal.


EX.NO.2
DATE:
LIST SWAP
AIM:
To write a user defined function that takes a list as a parameter and swaps the content
with the next value divisible by 5.
SOURCE CODE:
def swap(lst):
for i in range(len(lst)-1):
if lst[i+1]%5==0:
lst[i],lst[i+1]=lst[i+1],lst[i]
print(lst)
lst=[]
while True:
print("\nChoose the operation to perform:")
print("1.list creation")
print("2.swap value")
print("3.Exit")
ch=int(input("Enter your choice"))
if ch==1:
lst=eval(input("Enter a list"))
elif ch==2:
swap(lst)
elif ch==3:
break
else:
print("Invalid Choice")

Result:
The above output has been verified in the terminal.
SAMPLE OUTPUT:
Choose the operation to perform:
1. list creation
2. swap value
3. Exit
Enter your choice1
Enter a list[3,25,13,6,35,8,14,45]
Choose the operation to perform:
1. list creation
2. swap value
3.Exit
Enter your choice2
25 3 13 35 6 8 45 14
Choose the operation to perform:
1. list creation
2. swap value
3.Exit
Enter your choice3
EX.NO.3

DATE:
String Operations
AIM:
To write a menu driven program in python using user defined functions to take string as

input and
(i) To check whether the given string is palindrome or not.
(ii) To count number of occurrences of a given character.

SOURCE CODE:
def palindrome(s):
rev=s[::-1]
if rev==s:
print("The String is palindrome")
else:
print("The string is not a palindrome")
def Count(st,choice):
c=st.count(ch)
return c
#Main program
while True:
print("Menu")
print("1.palidrome")
print("2.To count number of occurrences of a given character")
print("3. Exit")
opt=int(input("Enter your choice:"))
if opt==1:
s=input("enter the string:")
palindrome(s)
elif opt==2:
st=input("Enter the string:")
ch=input("Enter a character")
cnt=Count(st,ch)
print("The character",ch,"is present in",st,"is",cnt,"times")
elif opt==3:
break
else:
print("Invalid Choice")
Result:
The above output has been verified in the terminal.

SAMPLE OUTPUT:
Menu
1. palidrome
2. To count number of occurrences of a given character
3. Exit
Enter your choice:1
enter the string:race
The string is not a palindrome
Menu
1. palidrome
2. To count number of occurrences of a given character
3. Exit
Enter your choice:2
Enter the string:race
Enter a charactera
The character a is present in race is 1 times
Menu
1. palidrome
2. To count number of occurrences of a given character
3. Exit
Enter your choice: 3
EX.NO.4

DATE:
To Show Grades using Dictionary
AIM:
To write a python program that uses a function showGrades(s) which takes the dictionary S

as an argument. The dictionary, S contains Name:[Eng,Math,CS] as key value pairs.The function


displays the corresponding grades obtained by the student according to the following grading
rules:

Average of Eng,Math,CS Grade


>=90 A
<90 but >=60 B
<60 C

SOURCE CODE:

def showGrades(s):
for k,v in s.items():
if sum(v)/3>=90:
grade='A'
elif sum(v)/3>=60:
grade='B'
else:
grade='C'
print(k,sum(v),sum(v)/3,"-",grade)

s={"Amit":[92,86,64],"Nagma":[65,42,43],"David":[92,90,88]}
showGrades(s)
Sample Output:
Amit 242 80.66666666666667 - B
Nagma 150 50.0 - C
David 270 90.0 – A

Result:

The above output has been verified in the terminal.


EX.NO.5

DATE:
Dictionary –Create and Update
AIM:
To write a python script to print a dictionary where the keys are numbers between 1 and

15(both included) and the values are square of keys. Also write a function search () that takes in
the dictionary d as parameter and searches for a particular key, if found returns the corresponding
value, if not found, an error message will displayed.
Sample dictionary
{1:1, 2:4, 3:9, 4:16,…15:225}

SOURCE CODE:

def search(d):
x=int(input("Enter a key-value to search"))
if x in d.keys():
print("key",x,"is found, the value is",d.get(x))
else:
print('key not found')
d={}
for i in range(1,16):
d[i]=i*i
print(d)
while True:
print("1.Search for a value")
print("2.Exit")
ch=int(input("Enter your choice:"))
if ch==1:
search(d)
elif ch==2:
break
else:
print("invalid choice")
Sample Output:
Run1
{1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100, 11: 121, 12: 144, 13: 169, 14: 196, 15:
225}
1. Search for a value
2. Exit
Enter your choice: 1
Enter a key-value to search5
key 5 is found, the value is 25
1. Search for a value
2. Exit
Enter your choice: 2
>>>
Run2:
{1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100, 11: 121, 12: 144, 13: 169, 14: 196, 15:
225}
1. Search for a value
2.Exit
Enter your choice:1
Enter a key-value to search16
key not found
1. Search for a value
2.Exit
Enter your choice:2
>>>
Result:
The above output has been verified in the terminal.
EX.NO:6

DATE:

CREATING A PYTHON PROGRAM TO READ A TEXT FILE AND DISPLAY EVERY


SENTENCE IN A SEPARATE LINE.

AIM:
To create a python program to read a Text file and Display every sentence in a
Separate line.

SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is
verified.
SAMPLE OUTPUT:
Story.txt:
EX.NO:7

DATE:

CREATING A PYTHON PROGRAM TO READ A TEXT FILE AND DISPLAY THE NUMBER
OFVOWELS/CONSONANTS/LOWER CASE/ UPPERCASE CHARACTERS.
AIM:
To write a Python Program to read a text file "Story.txt" and displays
the number of Vowels/ Consonants/ Lowercase / Uppercase/characters
in the file.

SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is
verified.
SAMPLE OUTPUT:
Story.txt:
EX.NO:8

DATE:

CREATING A PYTHON PROGRAM TO COPY PARTICULAR LINES OF A TEXT FILE INTO


AN ANOTHER TEXT FILE

AIM:

To write a python program to read lines from a text file "Sample.txt" and
copy those lines into another file which are starting with an alphabet 'a' or
'A'.

SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is
verified.
SAMPLE OUTPUT:
Python Executed Program output:

Sample.txt:

Python Executed Program Output:

New.txt:
EX.NO:09

Date:
CREATING A PYTHON PROGRAM TO CREATE AND SEARCH RECORDS IN BINARY
FILE

AIM:

To write a Python Program to Create a binary file with roll number and
name. Search for a given roll number and display the name, if not found
display appropriate message.

SOURCE CODE:
Result:
Thus, the above Python program is executed successfully and the output is
verified.

SAMPLE OUPUT:

PYTHON PROGRAM EXECUTED OUTPUT:


EX.NO:10

DATE:

CREATING A PYTHON PROGRAM TO CREATE AND UPDATE/MODIFY RECORDS IN


BINARY FILE
AIM:
To write a Python Program to Create a binary file with roll number, name, mark
and update/modify the mark for a given roll number.
SOURCE CODE:
Result:
Thus, the above Python program is executed successfully and the output is
verified.

SAMPLE OUTPUT:
PYTHON PROGRAM EXECUTED OUTPUT:
EX.NO: 11

DATE:

CREATING A PYTHON PROGRAM TO CREATE AND SEARCH EMPLOYEE’S RECORD IN


CSV FILE.
AIM: To write a Python program Create a CSV file to store Empno, Name, Salary and
search any Empno and display Name, Salary and if not found display appropriate
message.
SOURCE CODE:
Result:
Thus, the above Python program is executed successfully and the output is
verified.

SAMPLE OUTPUT:
PYTHON PROGRAM EXECUTED OUTPUT:
EX.NO: 12

DATE:

CREATING A PYTHON PROGRAM TO PERFORM READ AND WRITE


OPERATION WITH CSV FILE

AIM:

To write a Python program Create a CSV file to store Rollno, Name,


marks and read the content from csv file.
SOURCE CODE:
Result:
Thus, the above Python program is executed successfully and the
output is verified.
SAMPLE OUTPUT:
PYTHON PROGRAM EXECUTED OUTPUT:
Ex.no.13
Date:

AIM: To write a python program to maintain book details like book code, book title and price
using stacks data structures
book=[]
def push():
bcode=input("Enter bcode ")
btitle=input("Enter btitle ")
price=input("Enter price ")
bk=(bcode,btitle,price)
book.append(bk)

def pop():
if(book==[]):
print("Underflow / Book Stack in empty")
else:
bcode,btitle,price=book.pop()
print("poped element is ")
print("bcode ",bcode," btitle ",btitle," price ",price)

def peek():
if book==[]:
print("Book stack is empty")
else:
top=len(book)-1
print("the top of the book stack is :",book[top])

def traverse():
if book==[]:
print("Book stack is empty")
else:
top=len(book)-1
for i in range(top,-1,-1):
print(book[i])

while True:
print("1. Push")
print("2. Pop")
print("3.peek")
print("4. Traversal")
print("5. Exit")
ch=int(input("Enter your choice "))
if(ch==1):
push()
elif(ch==2):
pop()
elif(ch==3):
peek()
elif(ch==4):
traverse()
elif(ch==5):
print("End")
break
else:
print("Invalid choice")
SAMPLE OUTPUT:
PYTHON PROGRAM EXECUTED OUTPUT

1. Push
2. Pop
3.peek
4. Traversal
5. Exit
Enter your choice 1
Enter bcode 101
Enter btitle computer
Enter price 200
1. Push
2. Pop
3.peek
4. Traversal
5. Exit
Enter your choice 1
Enter bcode 102
Enter btitle physics
Enter price 100
1. Push
2. Pop
3.peek
4. Traversal
5. Exit
Enter your choice 2
poped element is
bcode 102 btitle physics price 100
1. Push
2. Pop
3.peek
4. Traversal
5. Exit
Enter your choice 3
the top of the book stack is : ('101', 'computer', '200')
1. Push
2. Pop
3.peek
4. Traversal
5. Exit
Enter your choice 4
('101', 'computer', '200')
1. Push
2. Pop
3.peek
4. Traversal
5. Exit
Enter your choice 5
End
Ex.no.14
Write a python program using function PUSH (Arr), where Arr is a list of numbers. From this list
push all numbers divisible by 5 into a stack implemented by using a list. Display the stack if it has at
least one element, otherwise display appropriate error message.

AIM:
To write a python program using function PUSH (Arr), where Arr is a list of numbers. From this list
push all numbers divisible by 5 into a stack implemented by using a list. Display the stack if it has at
least one element, otherwise display appropriate error message.

SOURCE CODE:
def push(Arr,item):
if item%5==0:
Arr.append(item)

def pop(Arr):
if Arr==[]:
print("No item found")
else:
print("The deleted element:")
return Arr.pop()

def show():
if Arr==[]:
print('No item found')
else:
top=len(Arr)-1
print("The stack elements are:")
for i in range(top,-1,-1):
print(Arr[i])
#Main program
Arr=[]
top=None
while True:
print('****** STACK IMPLEMENTATION USING LIST ******')
print('1: PUSH')
print('2: pop')
print('3: Show')
print('0: Exit')
ch=int(input('Enter choice:'))
if ch==1:
val=int(input('Enter no to push:'))
push(Arr,val)
elif ch==2:
res=pop(Arr)
print(res)
elif ch==3:
show()
elif ch==0:
print('Bye')
break
Output is:
****** STACK IMPLEMENTATION USING LIST ******
1: PUSH
2: pop
3: Show
0: Exit
Enter choice:1
Enter no to push:55
****** STACK IMPLEMENTATION USING LIST ******
1: PUSH
2: pop
3: Show
0: Exit
Enter choice:1
Enter no to push:33
****** STACK IMPLEMENTATION USING LIST ******
1: PUSH
2: pop
3: Show
0: Exit
Enter choice:2
The deleted element:
55
****** STACK IMPLEMENTATION USING LIST ******
1: PUSH
2: pop
3: Show
0: Exit
Enter choice:3
No item found
****** STACK IMPLEMENTATION USING LIST ******
1: PUSH
2: pop
3: Show
0: Exit Enter choice:0 Bye
Ex.no.15

Write a python program to create a dictionary containing names and marks as key-value pairs of 5
students.
With separate user-defined functions to perform the following operations. Push the keys (name of
the student) of the dictionary into a stack, where the corresponding value (marks) is greater than
70.
Display the content of the stack.

SOURCE CODE:

def push(stk,d):
for i in d:
if d[i]>70:
stk.append(i)

def disp():
if stk==[]:
print("stack is empty")
else:
top=len(stk)-1
print(“The stack elements are;”)
for i in range(top,-1,-1):
print(stk[i])
stk=[]
d={}
print("performing stack operation using Dictionary")
while True:
print()
print("1.push")
print("2.disp")
print("0.exit")
opt=int(input("Enter your choice:"))
if opt==1:
d["Ramesh"]=int(input("Enter the mark of ramesh:"))
d["Umesh"]=int(input("Enter the mark of Umesh:"))
d["Vishal"]=int(input("Enter the mark of Vishal:"))
d["Khushi"]=int(input("Enter the mark of Khushi:"))
d["Ishika"]=int(input("Enter the mark of Ishika:"))
push(stk,d)
elif opt==2:
disp()
elif opt==0:
print('Bye)
break
OUTPUT:

Performing stack operation using Dictionary

SAMPLE OUTPUT
1. push
2. disp
0. exit
Enter your choice:1
Enter the mark of ramesh: 55
Enter the mark of Umesh: 66
Enter the mark of Vishal: 77
Enter the mark of Khushi: 44
Enter the mark of Ishika: 88

1. push
2.disp
0.exit
Enter your choice:2
Ishika
Vishal

1. push
2.disp
0.exit
Enter your choice:0
Bye
>>>
EX.NO:16

DATE:
CREATING A PYTHON PROGRAM TO INTEGRATE MYSQL WITH PYTHON
(display Avgmarks greater than 75)
AIM:
To create a python program to integrate mysql with python to display the avgmarks
greater than 75

SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is
verified.
SQL Table

Output:
EX.NO: 17
DATE
CREATINGAPYTHONPROGRAM TOINTEGRATEMYSQLWITHPYTHON
(INSERTING RECORDS AND DISPLAYING RECORDS)
AIM:
To write a Python Program to integrate MYSQL with Python by inserting records to
Emp table and display the records.
SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is
verified.
SAMPLE OUTPUT:
Python Executed Program Output:

SQL OUTPUT:
EX.NO: 18

CREATING A PYTHON PROGRAMTO INTEGRATEMYSQLWITHPYTHON


(SEARCHING AND DISPLAYING RECORDS)

AIM:

To write a Python Program to integrate MYSQL with Python to search an Employee


using EMPID and display the record if present in already existing table EMP, if not
display the appropriate message.
SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is verified.
SAMPLE OUTPUT:
Python Executed Program Output:

RUN -1:

Run – 2:

SQL OUTPUT:
OUTPUT -1:

OUTPUT -2:
EX.NO: 19

CREATING A PYTHON PROGRAMTO INTEGRATEMYSQLWITHPYTHON


(UPDATING RECORDS)

AIM:

To write a Python Program to integrate MYSQL with Python to search an


Employee using EMPID and update the Salary of an employee if present
in already existing table EMP, if not display the appropriate message.
SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is verified.
SAMPLE OUTPUT:
Python Executed Program Output:

RUN -1:

Run -2:

SQL OUTPUT:
EX.NO: 20

DATE:

CREATINGAPYTHONPROGRAM TOINTEGRATEMYSQLWITHPYTHON
(DELETING RECORDS)
AIM:
To write a Python Program to integrate MYSQL with Python to search an Employee
using EMPID and delete the record of an employee if present in already existing table
EMP, if not display the appropriate message.

SOURCE CODE:

Result:
Thus, the above Python program is executed successfully and the output is
verified.
SAMPLE OUTPUT:
Python Executed Program

Output :Run-1

Output RUN – 2:

SQL OUTPUT:
Ex.No.21 Sql exercise -1

a) To show all information about the students of the history department


b) To list the names of female students who are in Hindi department.
c) To list the names of all the students with their date of admission in descending
order.
d) To display the students name, age, fee, for male students only.

TABLE STUDENT

Sno Name Age Dept Dateofadmin Fee gen


der
1. Panbaj 24 Computer 10/01/1999 120 M
2 Shalini 21 History 24/03/1998 200 F
3. Sanjay 20 Hindi 12/12/1996 300 M
4 Sudha 19 History 01/7/1999 400 F
5 Rakesh 18 Hindi 05/09/1991 250 M
6 Shaku 19 History 27/06/1997 300 M
7 Surya 22 Computer 25/02/1997 210 M
8 Shika 23 Hindi 31/07/1997 200 f

Draw the table on left hand side


Answers
a. SELECT * from student where DEPT=”HISTORY”;
b. SELECT NAME FROM STUDENT WHERE GENDER =’F’ AND DEPT =’HINDI’;
c. SELECT NAME, DATEOFADMIN FROM STUDENT ORDER BY DATEOFADMIN DESC;
d. SELECT NAME, FEE, AGE FROM STUDENT WHERE GENDER=’M’;
Ex.No.22 SQL Exercise-2
a. To display dcode and description of each classes in ascending order dcode.
b. to display the details of all the dresses which have launch date in between
05- dec-07 to 20-jun-08
c. To display the average price of all the dress which are made up of material with
mcode as M003.
d. To display material wise higher and latest price of dresses from dress table.

DCODE DESCRIPTION PRICE MCODE


LAUNCH
DATE
10001 FORMAL 1250 M007 06-JUN-08
SHIRT
10020 FROCK 750 M004 06-SEPT-07
10012 INFORMAL 1150 M002 06-JUN-08
SHIRT
10090 TULIP SHIRT 850 M003 31-MAR-07
10019 EVENING 850 M003 20-OCT-08
GOWN
10023 PENCIL 1250 M003 20-OCT-08
SHIRT
10081 SLACHS 850 M003 09-MAR-08
10007 FORMAL 1450 M001 20-OCT-08
PANT
10008 INFORMAL 1400 M002 07-APR-09
PANT
10024 BABY TOP 850 M003 06-JUN-08

TABLE MATERIAL
MCODE TYPE
M001 TERELENE
M002 COTTON
M003 POLYSTER
M004 SILK

ANSWERS.
A. SELECT DCODE, DESCRIPTION FROM DRESS ORDER BY DCODE;
B. SELECT * FROM DRESS WHERE LAUNCH DATE BETWEEN ’05-DEC-07’ AND ’20-
JUN-08’
C. SELECT AVG(PRICE) FROM DRESS WHERE DCODE =”M003”;
D. SELECT MCODE, MAX(PRICE),MIN(PRICE)FROM DRESS GROUP BY
MCODE;
Ex.No.23 SQL Exercise-3
a.) To display the details of those consumer whose address is delhi
b. To display the details of stationary whose price is in the range of 8 to 15.
c. To display the consumer name, address from table consumer and company and
price from table stationary with their corresponding matching S_ID.
d.) To increase the price of all the stationary by 2.

TABLE: STATIONARY
S_ID STATIONARY COMPANY PRICE
NAME
DP01 DET PEN ABC 10
PL02 PENCIL XYZ 6
ER05 ERASER XYZ 7
PL01 PENCIL CAN 5
GP02 GELPEN ABC 15

TABLE: CONSUMER
C_ID CONSUMER NAME ADDRESS S_ID
01 GOOD EARNER DELHI PL01
06 WHITE WELL MUMBAI GP02
12 TOPPER DELHI DP01
15 WRITE 4 DRAW DELHI PL02
16 MOTIVATION BANGALORE PL01

ANSWERS.
a.) SELECT * FROM CONSUMER WHERE ADDRESS=”DELHI”;
b.) SELECT CONSUMER NAME, ADDRESS ,COMPANY, PRICE FROM CONSUMER A,
STATIONARYB WHERE A.S_ID=B.S_ID;
c.) UPDATE STATIONARY SET PRICE=PRICE+2;
d.) INSERT INTO CONSUMER VALUES(17,”FAST WRITER”,”MUMBAI’,”GP01”);

You might also like