INPUT OUTPUT
a=int(input("Enter a number: ")) Enter a number: 1
b=int(input("Enter a number: ")) Enter a number: 2
if a>b: 2 is greater than 1
print(a,'is greater than',b)
else: Enter a number: 2
print(b,'is greater than',a) Enter a number: 1
2 is greater than 1
# IF-ELSE CODE
INPUT OUTPUT
num=int(input("enter a number: ")) # IF-ELSEenter
CODE a number: 2
if num>=0: positive
if num==0:
print("zero") enter a number: 0
else: zero
print("positive")
else: enter a number: -2
print("negative") negative
INPUT #IF-ELIF CODE OUTPUT
print('1.Area of circle') 1.Area of circle
print('2.Cirucumference of circle') 2.Cirucumference of circle
ch=int(input("Enter your choice: ")) Enter your choice: 1
r=int(input("Enter radius of circle: ")) Enter radius of circle: 5
if ch==1: area is 78.5
ar=3.14*r**2
print('area is',ar) 1.Area of circle
elif ch==2: 2.Cirucumference of circle
cum=2*3.14*r Enter your choice: 2
print('cirucmference is:',cum) Enter radius of circle: 4
else: cirucmference is: 25.12
print('Enter appropriate choice')
MUKESH YADAV
CLASS- XI C