Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

1) wap to print given integer no.

is single digit,double digit,triple digit or more than that:


a=int(input('enter'))
if 0<=a<10: print('single')
elif 10<=a<100:
print('double')
elif 100<=a<1000:
print('triple') else:
print('more')

2) wap to FINd pts lies in which quadrant


x=int(input('enter'))
y=int(input('enter'))
if x>0 and y>0:
print('first quadrant')
elif x<0 and y>0:
print('second quadrant')
elif x<0 and y<0:
print('third quadrant')
elif x>0 and y<0:
print('Fourth quadrant')
elif x==0 and y!=0:
print('y-axis')
elif x!=0 and y==0:
print('x-axis')
else:
print('origin')

3) WAP to print the value as it is only if the length of the value is even
a=eval(input(‘enter ‘))
if type(a)==[set,dict,list,tuple,str]
if len(a)%2==0:
print(‘the value is:’a)
else:
print(‘give another datatype’)
else:
print(‘another datatype’)

4) Wap

You might also like