Skip to content

Commit a3c3ecd

Browse files
committed
identify soulving and condition => if else and loop => for | and step one to solve prime numbers
1 parent ba93683 commit a3c3ecd

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

007.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# def salam(value):
2+
# print('hi' + ' ' + value)
3+
#
4+
#
5+
# for name in ['martin', 'reza', 'amir', 'jalal', 'my soulmate']:
6+
# salam(name)
7+
#################################
8+
#
9+
# def jam(x, y):
10+
# print(x + y)
11+
#
12+
#
13+
# jam('2', '3')
14+
# jam(2, 3)
15+
# jam('Mr', 'Rezoo')

008.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
n = 13
2+
3+
prime = True
4+
for i in range(2, n):
5+
if n % i == 0:
6+
prime = False
7+
8+
if prime:
9+
print("it is prime")
10+
else:
11+
print("is is not prime")
12+

0 commit comments

Comments
 (0)