Skip to content

Commit 8764da2

Browse files
committed
change directory name
1 parent c52f71f commit 8764da2

28 files changed

+15
-0
lines changed

.DS_Store

6 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.

1장_숫자/finding_gcd.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def finding_gcd(a, b):
2+
''' 두 수의 최대공약수를 반환한다. '''
3+
while(b != 0):
4+
result = b
5+
a, b = b, a % b
6+
return result
7+
8+
def test_finding_gcd():
9+
number1 = 21
10+
number2 = 12
11+
assert(finding_gcd(number1, number2) == 3)
12+
print('Tests passed!')
13+
14+
if __name__ == '__main__':
15+
test_finding_gcd()
File renamed without changes.

0 commit comments

Comments
 (0)