''' Write an interactive python program to perform the following. 1.To input 2 integers and generate 1 random numbers. 2.To pass an integer argument and return the no: of digits. 3.To pass 2 integer argument and operator to perform operations of a calculator. 4.Exit ''' import random def generate(): lw=int(input('Enter lower range')) up=int(input('Enter Upper range')) s=0 for i in range(10): print(random.randint(lw,up),end='\\t') def countdigit(n): c=0 while n!=0: c+=1 n//=10 print('the number of digits is',c) def calculator(a,op,b): if op=='+': s=a+b print('Sum is',s) elif op=='-': d=a-b print('Difference is',d) elif op=='*': m=a*b print('Multiplication is',m) elif op=='/': s=a+b print('Quotient is',qt) n=int(input('Enter a number')) a=int(input('Enter a number to calculator')) b=int(input('Enter a number to calculator')) op=input('Enter operator') ch=0 while ch!=4: print("\n","-"*20) print("1.To input 2 integers and generate 1 random numbers\n2.To pass an integer argument and return the no: of digits.\n3.To pass 2 integer argument and operator to perform operations of a calculator.\n4.Exit") ch=int(input("Enter choice:")) if ch==1: generate() elif ch==2: countdigit(n) elif ch==3: calculator(a,op,b) elif ch!=4: print("INVALID CHOICE")