0% found this document useful (0 votes)
3 views5 pages

Manualpr

The document contains a series of programming exercises that involve converting currencies, calculating areas and volumes, and performing basic mathematical operations. It includes programs for converting U.S. dollars to Indian rupees, bits to larger data units, finding square roots, and calculating the area and perimeter of geometric shapes. Additionally, it features a program to swap the values of two variables.

Uploaded by

sktaufik753
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)
3 views5 pages

Manualpr

The document contains a series of programming exercises that involve converting currencies, calculating areas and volumes, and performing basic mathematical operations. It includes programs for converting U.S. dollars to Indian rupees, bits to larger data units, finding square roots, and calculating the area and perimeter of geometric shapes. Additionally, it features a program to swap the values of two variables.

Uploaded by

sktaufik753
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/ 5

Practical No.

Q.1) Write a program to convert U.S. dollars to Indian rupees.

Program:-

usdollar=int(input("Enter Dollar amount=="))


indrup=usdollar*86.56
print("Indian Rupee==",indrup)

O/P:-

2. Write a program to convert bits to Megabytes, Gigabytes and Terabytes.

Program:-

bits=int(input("Enter number of bits=="))

byte=bits/8

kb=byte/1024

mb=kb/1024

gb=mb/1024

tb=gb/1024

print("Megabytes==",mb)

print("Gigabytes==",gb)

print("Terabytes==",tb)

O/P:-
Practical No.3

Q.3) Write a program to find the square root of a number.

Program:-

a=int(input("Enter a number="))
sq=a**0.5
print("Square root of ",a,"is ==" ,sq)

O/P:-

Q.4) Write a program to find the area of Rectangle.

Program:-

length=int(input("Enter length="))
breadth=int(input("Enter breadth="))
print("Area of Rectangle is =",(length*breadth))

O/P:-

Q.5) Write a program to calculate area and perimeter of the square.

import maths=int(input("Enter side=="))

print("Area==",s*s)

print("Perimeter==",(4*s))

O/P:-

Enter side==5

Area== 25

Perimeter== 2
Practical No.3

Q.6)Write a program to calculate surface volume and area of a cylinder.

Program:-

r=int(input("Enter Radius=="))
h=int(input("Enter Height=="))

sa=3.14*r*r*h
ac=2*3.14*r*(r+h)
print("surfae area==",sa)
print("Area of cylinder==",ac)

O/P:-

Q.7) Write a program to swap the value of two variables.

Program:-
no1=int(input("Enter 1st no=="))
no2=int(input("Enter 2nd no=="))
print("Before swapping==")
print("no1=",no1)
print("no2=",no2)
temp=no1
no1=no2
no2=temp
print("After swapping==")
print("no1=",no1)
print("no2=",no2)
O/P:-
Practical No.3
Practical No.3

You might also like