Roopali Project
Roopali 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:-
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:-
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:-
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:-
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:-
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:-
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]
k=5
result=binarySearch(arr,k,0,len(arr)-1)
if result!=-1:
print("Element is present at index"+str(result))
else:
print("Not found")
OUTPUT:-
*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));
*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));
*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));
*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));
*Create a table:-
create table salesman(salesman_number varchar2(10),salesman_name varchar2(15),address1
varchar2(30),address varchar2(30),city varchar2(10),pin_code number(8),sell_amt number(6),tgt_to_get
number(6),ytd_sales number(6),remark varchar2(10));
QUERIES
1.Find out the name of all the Client from Client_Master table:-
SQL> Select Name from client_master02;
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);
16.Retrieve all information about supplier whose name begin with ‘do’ from
supplier_master:-
SQL> Select * from supplier_master where supplier_name like'do%';
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:-
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>
</html>
OUTPUT:-
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>
OUTPUT:-
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>
OUTPUT:-
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>
</table>
</html>
OUTPUT:-
CODING:-
<html>
<head><title>Hyperlink</title></head>
<body>
</body>
</html>
OUTPUT:-
CODING:-
<html>
<head><title>image</title>
</head>
<body>
<img src="C:\Users\LENOVO\Desktop\RS\party.jpg">
<!---image source>
</body>
</html>
OUTPUT:-
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:-
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:-
CODING:-
<html>
<head>
<title>form</title>
</head>
<body>
<form>
Password:<input type="password"><br>
<input type="submit"value="SUBMIT">
</form>
</body>
</htmi>
OUTPUT:-