Final Project
Final Project
_______________________________________________________________________________________________
ASSIGNMENT-01
Q1. Write a program that reads an integer value and prints -leap year or -not a leap year.
CODING:-
for m in range(1,n+1):
print("*",end='')
print("")
OUTPUT:-
CODING:-
num=int(input("Enter a number:"))
factorial=1
if num<0:
print("Sorry,factorial does not exist for negative numbers")
elif num==0:
print("The factorial of 0 is 1")
else:
for i in range(1,num+1):
factorial=factorial*i
print("The factorial of",num,"is",factorial)
OUTPUT:-
OUTPUT:-
ASSIGNMENT-05
Q5. Write a program to check whether the input number is even or odd.
CODING:-
num = int(input("Enter any number:"))
if(num%2)==0:
print("The number is even")
else:
print("The number is odd")
OUTPUT:-
CODING:-
nterms=int(input("How many terms?"))
n1,n2=0,1
count=0
if nterms<=0:
print("please enter a positive integer")
elif nterms==1:
print("Fibonacci sequence upto",nterms,":")
print(n1)
else:
print("Fibonacci sequence:")
while count<nterms:
print(n1)
nth=n1+n2
n1=n2
n2=nth
count+=1
OUTPUT:-
CODING:-
num1=int(input("Enter first number:"))
num2=int(input("Enter second number:"))
num3=int(input("Enter third number:"))
if(num1>=num2)and(num1>=num3):
largest=num1
elif(num2>=num1)and(num2>=num3):
largest=num2
else:
largest=num3
print("The largest number is",largest)
OUTPUT:-
CODING:-
num=int(input("enter a number"))
factors=[]
for i in range(1,num+1):
if num%i==0:
factors.append(i)
print("Factors of{}={}".format(num,factors))
OUTPUT:-
ASSIGNMENT-09
Q.9 Write a program to sort a list using bubble sort.
CODING:-
arr=[20,9,6,3,1]
n=len(arr)
for i in range(n-1):
for j in range(n-1-i):
if arr[j]>arr[j+1]:
arr[j], arr[j+1]=arr[j+1],arr[j]
OUTPUT:-
ASSIGNMENT-10
Q.10 Write a program to sort a list using Selection sort.
CODING:-
arr=[20,9,16,3,5]
n=len(arr)
for i in range(n-1):
pos_smallest=i
for j in range(i+1,n):
if arr[j]<arr[pos_smallest]:
pos_smallest=j
arr[i],arr[pos_smallest]=arr[pos_smallest],arr[i]
OUTPUT:-
ASSIGNMENT-11
Q.11 Write a program to sort a list using Insertion sort.
CODING:-
arr=[20,9,16,3,5]
n=len(arr)
for i in range(1,n):
temp=arr[i]
j=i-1
while(j>=0 and temp<arr[j]):
arr[j+1]=arr[j]
j-=1
arr[j+1]=temp
OUTPUT:-
ASSIGNMENT-12
Q.12 Write a program to implement linear search on list.
CODING:-
def LinearSearch(array,n,k):
for j in range(0,n):
if(array[j]==k):
return j
return-1
array=[1,3,5,7,9]
k=7
n=len(array)
result=LinearSearch(array,n,k)
if(result==-1):
print("Element not found")
else:
print("Element found at index:",result)
OUTPUT:-
ASSIGNMENT-13
Q.13 Write a program to implement binary search on list.
CODING:-
def binarySearch(arr,k,low,high):
while low<=high:
mid=low+(high-low)//2
if arr[mid]==k:
return mid
elif arr[mid]<k:
low=mid+1
else:
high=mid-1
return-1
arr=[1,3,5,7,9]
else:
print("Not found")
OUTPUT:-
3. Dis
pla
y
the
table.
ASSIGNMENT-02
2.College(cid,cname,city,phn)
ASSIGNMENT-03
3.Draw a Table Client Master in SQL:-
*Creating a table:-
create table client_master02(client_number varchar2(6),name varchar2(15),city varchar2(15),pincode
number(10),state varchar2(12),balance number(10,2));
ASSIGNMENT-04
4.Draw a Table Product Master in SQL:-
*Create a table:-
create table product_master(product_number varchar2(8),description varchar2(10),profit_number
number(4,2),qty_on_hand number(8),r_lvl number(8),sell_price number(10),cost_price number(8,2));
ASSIGNMENT-05
5.Draw a Table Supplier Master in SQL:-
*Create a table:-
create table supplier_master(supplier_number varchar2(6),supplier_name varchar2(20),address
varchar2(30),city varchar2(10),pin_code number(10));
ASSIGNMENT-06
6.Draw aTable Employee in SQL:-
*Create a table:-
create table emp03(emp_number varchar2(5),emp_name varchar2(10),desigination
varchar2(15),department_number number(5),salary number(10),join_date varchar(20));
ASSIGNMENT-07
7.Draw a Table Salesman in SQL:-
*Create a table:-
QUERIES
1.Find out the name of all the Client from Client_Master table:-
SQL> Select Name from client_master02;
Roopali sahu PGDCA(2ND SEM) Page 24
Programming in SQL || 2023-24
_______________________________________________________________________________________________
10.Select data from employee table who are not working in department_Number(9,2,4):-
SQL> Select*from emp03 where department_number not in(9,2,4);
15.Display the name of the employee who are working teacher,doctor,police salary is
greater 2500:-
SQL> select emp_name from emp03 where desigination in('teacher','doctor','police')and(salary>45000);
16.Retrieve all information about supplier whose name begin with ‘do’ from
supplier_master:-
SQL> Select * from supplier_master where supplier_name like'do%';
17.Retrieve the
supplier_name where second character of name is ‘ a%’:-
SQL> Select supplier_name from supplier_master where supplier_name like'_a%';
CODING:-
<html>
<head><title>unordered list</title></head>
<body>
<!---heading tags--->
<h1>Nested Unordered List</h1>
<h2>GeeksForGeeks courses List</h2>
<ul type="dot">
<li> DSA</li>
<ul type="circle">
<li> Array</li>
<li>Linked</li>
<li>Stack</li>
<li>Queue</li>
</ul>
<li>Web Technologies</li>
<ul type="circle">
<li>HTML</li>
<li>CSS</li>
<li>Java Script</li>
</ul>
<li>Apptitude</li>
<li>Gate</li>
<li>Placement</li>
</ul>
</body>
</html>
OUTPUT:-
ASSIGNMENT-02
Roopali sahu PGDCA(2ND SEM) Page 32
Programming in HTML || 2023-24
_______________________________________________________________________________________________
Q.2 Write a program to create a Ordered List.
CODING:-
<html>
<head><title>Ordered List</title></head>
<body>
<!---heading tags--->
<ol>
<li>Reserved Attibute</li>
<ol type="I">
<li>HTML</li>
<li>Css</li>
<li>Js</li>
</ol>
<li>Start Attribute</li>
<ol type="i">
<li>HTML</li>
<li>Css</li>
<li>Js</li>
</ol>
<li>Type Attribute</li>
<ol type="1">
<li>HTML</li>
<li>Css</li>
<li>Js</li>
</ol>
</ol>
</body>
OUTPUT:-
ASSIGNMENT-03
CODING:-
<html>
<head><title>Text formatting</title></head>
<body>
My favorite<ins>color</ins>is<del>RED</del>blue.<br>
<p>new paragraph</p>
<big>big size</big>
<big>H<sub>2</sub>O</big>
<br>(a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup>
<br><strong><center>OR</center></strong>
2<sup>2</sup>=4
</body>
</html>
ASSIGNMENT-04
Roopali sahu PGDCA(2ND SEM) Page 36
Programming in HTML || 2023-24
_______________________________________________________________________________________________
Q.4 Write a program to create a following Table.
CODING:
<html>
<style>
table th,td
{border:1px solid black;
border-collapse:collapse;}
</style>
<center>
<table>
<tr>
<tr>
<th>Class</th>
<th>Subject1</th>
<th>Subject2</th>
<th>Subject3</th>
</tr>
<tr>
<th>BCA I</th>
<td>Visual Basic</td>
<td>PC Software</td>
<td>Electronics</td>
</tr>
<tr>
<th>BCA II</th>
<td>C++</td>
<td>DBMS</td>
<td>English</td>
</tr>
<tr>
<th>BCA III</th>
<td>Java</td>
OUTPUT:-
ASSIGNMENT-05
CODING:-
<html>
<style>
table th,td
{border:1px solid black;
border-collaps:collaps;}
</style>
<table>
<tr>
<th align="left">Course</th>
<th>OC</th>
<th>BC</th>
<th>MBC</th>
<th>SC/ST</th>
<th>TOTAL</th>
</tr>
<tr>
<th alignment="left">Computer Science</th>
<td>9</td>
<td>18</td>
<td>5</td>
<td>5</td>
<td>37</td>
</tr>
<tr>
<th alignment="left">Commerce</th>
<td>14</td>
<td>25</td>
<td>6</td>
<td>5</td>
<td>50</td>
</table>
</html>
OUTPUT:-
ASSIGNMENT-06
Roopali sahu PGDCA(2ND SEM) Page 40
Programming in HTML || 2023-24
_______________________________________________________________________________________________
Q3. Write an HTML Program to demonstratre hyperlinking between two web pages.
Create a marquee and also insert an image.
CODING:-
<html>
<head><title>Hyperlink</title></head>
<body>
</body>
</html>
OUTPUT:-
ASSIGNMENT-07
CODING:-
<html>
<head><title>image</title>
</head>
<body>
<img src="C:\Users\LENOVO\Desktop\RS\party.jpg">
<!---image source>
</body>
</html>
OUTPUT:-
ASSIGNMENT-08
CODING:-
<!Program for frameset>
<html>
<head><title>frameset</title></head>
<frameset cols="30%,30%,40%">
<frame src="ima1.html">
<frame src="ima2.html">
<frame src="ima3.html">
</frameset>
</html>
OUTPUT:-
ASSIGNMENT-09
New Delhi
New Delhi,the capital and the third largest city of india is a fusion of the ancient and the
modern. The refrains of the muslim dynasties with its architectural delights.Give the
najestic ambience of the bygone era.
CODING:-
<html>
<head><title>paragraph</title>
<body bgcolor="blue">
<i><u>
<h1 align="center">New Delhi
</h1></u>
<p>
New Delhi,the capital and the third largest city of india is a fusion of the ancient and the modern.The
refrains of the muslim dynasties with its architectural delights.Give the majestic ambience of the bygone
era.
</p>
</i>
</body>
</html>
OUTPUT:-
ASSIGNMENT-10
Roopali sahu PGDCA(2ND SEM) Page 44
Programming in HTML || 2023-24
_______________________________________________________________________________________________
Q.10 Write a program to create a following form.
CODING:-
<html>
<head>
<title>form</title>
</head>
<body>
<form>
Password:<input type="password"><br>
<input type="submit"value="SUBMIT">
</form>
</body>
</htmi>