0% found this document useful (0 votes)
2 views3 pages

3rd Practical

Uploaded by

prasad wadkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

3rd Practical

Uploaded by

prasad wadkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

3RD PRACTICAL

1. WAP to convert US dollars to Indian Rupees.

Program:
#At the time of program $1=₹86.44
dollars=float(input("Enter US dollars:"))
inr=dollars*86.44
print("INR conversion=",inr)

Output:

2. WAP to covert bits to Megabytes, Gigabyte and Terabytes

Program:
bit=int(input("Enter the bits:"))
print("Entered Bits: ",bit)
byte=bit/8
kb=byte/1024
mb=kb/1024
gb=mb/1024
tb=gb/1024
print("Megabytes: ",mb)
print("Gigabytes: ",gb)
print("Terabytes: ",tb)

Output:

3. WAP to find the square root of a number.


Program:
num=int(input("Enter the number: "))
print(num)
root=num**0.5
print("The square root: ",root)

Output:

4. WAP to find out the area of a rectangle.

Program:
#Area of Rectangle=length*width
len=float(input("Enter the Lenght: "))
wid=float(input("Enter the Width: "))
print("Area of Rectangle= ",len*wid)

Output:

5. WAP to calculate the area and perimeter of a square.

Program:
#Area=side^2 and Perimeter=4*side
side=float(input("Enter the side of a sqaure: "))
print("Area: ",side**2)
print("Perimeter: ",side*4)

Output:

6. WAP to find out the surface volume and area of a cylinder.


Program:
# pye= 3.14
# Volume of a cylinder= pye*radius^2*height
# Surface area of a cylinder= 2*pye*r^2+2*pye*radius*height
radius=float(input("Enter the radius: "))
height=float(input("Enter the height: "))
Volume=3.14*radius**2*height
Area=2*3.14*radius**2+2*3.14*height*radius
print("Volume: ",Volume)
print("Area: ",Area)

Output:

7. WAP to swap the value of two variables.

Program:
a=input("Enter the value of a: ")
b=input("Enter the value of b: ")
print("Value of a and b before swapping: ",a,b)
a,b=b,a
print("Value of a and b after swapping: ",a,b)

Output:

You might also like