2. Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13. EXAMPLE PROGRMS IN PYTHON
Prime or Not
-----------------
>>> for n in range(2,10):
... for x in range(2,n):
... if n%x==0:
... print n,'equals',x,'*',n/x
... break
... else:
... print n,'Is Prime'
...
2 Is Prime
3 Is Prime
4 equals 2 * 2
5 Is Prime
6 equals 2 * 3
7 Is Prime
8 equals 2 * 4
9 equals 3 * 3
14.
15.
16. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baab
te.com