Last active
February 26, 2016 09:33
-
-
Save ghostlyman/6d68deb7c57c4728070f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #Filename: Python_Course01_Q04_Prime_checker.py | |
| #This script is used to check the prime number. | |
| list1 = [1,3,54,6,4,3,5,6,4,34,332] | |
| x = 0 | |
| for num in list1: | |
| if num > 1: | |
| for i in range(2,num): | |
| if (num % i) == 0: | |
| break | |
| else: | |
| x += 1 | |
| print(x,'prime in the list') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment