3rd Practical
3rd Practical
Program:
#At the time of program $1=₹86.44
dollars=float(input("Enter US dollars:"))
inr=dollars*86.44
print("INR conversion=",inr)
Output:
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:
Output:
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:
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:
Output:
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: