Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

The Aditya Birla Public School, Kharach

Report File (AISSE)


Computer Science
Academic Year (2022-2023)

Name:- Sujal Patel


Roll number:-
Class:- 12 A Science
Suject teacher:-Mr.Umesh Khanzode
1.Query to Create Database And Use it:

2.Query to Create Table

3.Query to Insert Data Into Table

4.Query to Display all Rows from a Table:


5.Query to Display Specific Rows:

6.Query to insert data into specific columns:

7.Query to delete any data of table:


8.Query to Add New City and DOB in Table:

9.Query to remove or drop column

10.Query to Display Specific Columns with different Name:


11.Query to Update a Row in table

12.Query to Modify a Column


13.Query to Sort and Display Rows in Ascending Order:

14.Query to Sort and Display row in descending Order:

15.Query to Describe a Table:


16.Query to Put Text in Query Output

17.Query to Display Row From Pattern Matches:

18.Query to show only city names:

19.Query to show employee names having salary more than 22,000:


20.Query to use Avg() Function:

21.Query to use Sum() Function With A condition:

22.Query to use Min function:

23.Query to use Max function:


24.Query to Count Rows :

25.Query to Delete Table:

26.Query to Delete Database:


 PYTHON PROGRAMMING

1.Write a Function to push(),pop() and sdis() to add ,remove


and display student names from a list of
student,considering this list of studentss as stack data
structure in python.

st=[]
def push():
print("-----ADD student Name-----")
y='y'
while y=='y':
name=input("Enter student name:")
st.append(name)
y=input("do you want to add more name(y/n):")

def pop():
if st==[]:
print("stack is empty")
else:
print("deleted name:",st.pop())
print(st)

def sdis():
if st==[]:
print("stack is empty")
else:
ln=len(st)
for i in range(ln-1,-1,-1):
print(st[i])

2.Program that receives two numbers in a function and returns the results of
all arithmetic operations (+,-,*,/,%) on these numbers.

def arcalc(x,y):
return x+y,x-y,x*y,x/y,x%y

#__main__
num1=int(input("enter number 1:"))
num2=int(input("enter number 2:"))
add,sub,mul,div,mod=arcalc(num1,num2)
print("Addition of given numbers:",add)
print("Subtraction of given numbers:",sub)
print("Product of given numbers:",mul)
print("Division of given numbers:",div)
print("Modulo of given numbers:",mod)

3.Python Program to implement stack operations.

#####FUNCTIONS#####

def isempty(stack):
if stack==[]:
return True
else:
return False

def Push(stack,item):
global top
stack.append(item)
top=len(stack)-1

def Pop(stack):
global top
if isempty(stack):
return "Underflow"
else:
popped_item= stack.pop()
if len(stack)==0:
top=None
else:
top=len(stack)-1
return popped_item

def Peek(stack):
global top
if isempty(stack):
return "Underflow"
else:
top=len(stack)-1
return stack[top]

def Display(stack):
global top
if isempty(stack):
return "Underflow"
else:
top=len(stack)-1
print("Top ---> ",stack[top])
for i in range(top-1,-1,-1):
print(stack[i])

##-------------------------__main__---------------------------#
stack=[]
top=None

while True:
print("Stack project: ")
print("1.Push")
print("2.Pop")
print("3.Peek")
print("4.Display")
print("5.Exit")
choice=input("Enter your choice sir/mam!:")
print()

if choice=='1':
item=int(input("Enter your Item sir/mam: "))
Push(stack,item)

elif choice=='2':
item_popped=Pop(stack)
if item_popped == "Underflow":
print("Underflow error!")
print()
else:
print("Comrade just popped: ",item_popped)
print()

elif choice =='3':


item=Peek(stack)
if item == "Underflow":
print("Underflow error!")
print()
else:
print("Comrade Here: ",item)
print()

elif choice =='4':


Display(stack)

elif choice == '5':


print("Exiting")
print("Done!")
print()
break
else:
break
4.

You might also like