Prac 3
Prac 3
PRACTICAL NO: 3
Output:
X. Exercise
BITS_IN_BYTE = 8
BYTES_IN_MB = 1024 * 1024
BYTES_IN_GB = BYTES_IN_MB * 1024
BYTES_IN_TB = BYTES_IN_GB * 1024
Output:
if num < 0:
print("Square root is not defined for negative numbers.")
else:
sqrt = num ** 0.5
print(f"The square root of {num} is {sqrt:.2f}")
Output:
dd
area = side ** 2
perimeter = 4 * side
Output:
dd
Output:
a, b = b, a
print(f"After swapping:")
print(f"Value of a: {a}")
print(f"Value of b: {b}")
Output: