'''
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")
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}