Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- from math import sqrt
- b = int(input())
- c = b
- i = 2
- while c != 0:
- for a in range(1, b + 1, 1):
- while a % i != 0:
- i += 1
- if i <= sqrt(a):
- print (a, 'Composite ')
- c -= 1
- else:
- print (a, 'Prime')
- c -= 1
- input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement