<jupyter_start><jupyter_text>Assignment No - 2  Question !  Write a Python Function for finding a given number is Prime or not and do Unit Testing on it using PyLint and Unittest library.  Answer !<jupyter_code>def test_prime(n):
    if (n==1):
        return False
    elif (n==2):
        return True;
    else:
        for x in range(2,n):
            if(n % x==0):
                return False
        return True             
print(test_prime(2))
def test_prime(n):
    if (n==1):
        return False
    elif (n==2):
        return True;
    else:
        for x in range(2,n):
            if(n % x==0):
                return False
        return True             
print(test_prime(4))<jupyter_output>False<jupyter_text>Thank You !  Assignment No - 1  Question !  Make a small Generating Program for returning Armstrong Numbers In Between 1 To 1000 in a Generator Object.  Answer !<jupyter_code>for num in range(1,1000):
  temp=num
  sum=0
  while temp>0:
    digit=temp%10
    sum=sum+digit**3
    temp=temp//10

  if sum==num:
    print (num)<jupyter_output>1
153
370
371
407
StarcoderdataJupyterStructuredCleanDedup