0% found this document useful (0 votes)
14 views4 pages

Practical No 1,2,3 PWP

The document contains a series of practical Python programming exercises. It includes examples for printing Python version information, converting currency, memory units, calculating square roots, areas, and perimeters of geometric shapes, and swapping variable values. Each practical exercise demonstrates basic input and output operations in Python.
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)
14 views4 pages

Practical No 1,2,3 PWP

The document contains a series of practical Python programming exercises. It includes examples for printing Python version information, converting currency, memory units, calculating square roots, areas, and perimeters of geometric shapes, and swapping variable values. Each practical exercise demonstrates basic input and output operations in Python.
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/ 4

PRACTICAL NO 1

import sys
print("Python version")
print(sys.version)
print("Version Info.")
print(sys.version_info)

Output:

PRACTICAL NO 2

print("MSBTE")
PRACTICAL NO 3

1]

print("US DOLLAR TO INDIAN RUPEES")


dlr = float(input("Enter money in Dollars : $"))
rs = dlr*84.3
print("Money in Indian Rupees is :",rs)

2]

print("BITS TO MB, GB, TB")


b = float(input("Enter memory in bits : "))
mb = b*1.25*10**-7
gb = b*1.25*10**-10
tb = b*1.25*10**-13
print("Megabyte = ",mb)
print("Gigabyte = ",gb)
print("Terabyte = ",tb)

3]

print("Square Root of a Number ")


n = int(input("Enter the number : "))
sq = n**0.5
print("Square Root of a number is : ",sq)
4]

print("AREA OF A RECTANGLE")
l = float(input("Enter the Length : "))
b = float(input("Enter the Breadth : "))
ar = l*b
print("Area = ",ar)

5]

print("AREA AND PERIMETER OF A SQUARE")


side = float(input("Enter the side of square : "))
arsq = side**2
prm = 4*side
print("Area of square is : ",arsq)
print("Perimeter of square is :",prm)

6]

print("SURFACE VOLUME AND AREA OF A CYLINDER")


r = int(input("Enter the Radius : "))
h = int(input("Enter the Height : "))
vol = 3.14*r**2*h
arcyl = 2*3.14*r*h+2*3.14*r**2
print("Volume = ",vol)
print("Area = ",arcyl)
7]

a = int(input("Enter value of a : "))


b = int(input("Enter value of b : "))
temp = a
a=b
b = temp
print("After Swapping value of a is : ",a)
print("After Swapping value of b is : ",b)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy