Chap-2(B)

Mon 22 June 2026
age = int(input("Enter your age: "))
print(f"you are {age} years old.")
Enter your age:  25


you are 25 years old.
num = input("Enter two numbers: ").split()
a = int(num[0])
b = int(num[1])
print(a+b)
Enter two numbers:  14 11


25
flow = 7.9
int_to_float = int(flow)

print(int_to_float)
7
x = 2
y = 8
print(x**y)
256
num = int(input("Enter a number: "))
if num % 2 == 0:
    print("Even")
else:
    print("Odd")
Enter a number:  23


Odd


Score: 5

Category: python-notes