#!/usr/bin/env python
# coding: utf-8

# # Assignment 1:
# 1. Sum of n numbers with help of while loop

# In[3]:


n = int(input())
sum = 0
i =1
while(i<=n):
    sum = sum + i
    i = i +1
    print("sum of the number", sum)


# 2. Check a given inter whether its prime or not .

# In[3]:


num = int(input("Enter a number:"))

if num>9:
    for i in range(2,num):
        if (num % i) == 0:
            print(num,"is not prime number")
            break
else:
    print(num,"is prime number")


# In[ ]:





966b986142ce8e1c99a88a68a5de797cf1ff169e
<mask token>

<mask token>
while i <= n:
    sum = sum + i
    i = i + 1
    print('sum of the number', sum)
<mask token>
if num > 9:
    for i in range(2, num):
        if num % i == 0:
            print(num, 'is not prime number')
            break
else:
    print(num, 'is prime number')

n = int(input())
sum = 0
i = 1
while i <= n:
    sum = sum + i
    i = i + 1
    print('sum of the number', sum)
num = int(input('Enter a number:'))
if num > 9:
    for i in range(2, num):
        if num % i == 0:
            print(num, 'is not prime number')
            break
else:
    print(num, 'is prime number')

#!/usr/bin/env python
# coding: utf-8

# # Assignment 1:
# 1. Sum of n numbers with help of while loop

# In[3]:


n = int(input())
sum = 0
i =1
while(i<=n):
    sum = sum + i
    i = i +1
    print("sum of the number", sum)


# 2. Check a given inter whether its prime or not .

# In[3]:


num = int(input("Enter a number:"))

if num>9:
    for i in range(2,num):
        if (num % i) == 0:
            print(num,"is not prime number")
            break
else:
    print(num,"is prime number")


# In[ ]:




