Skip to content

Commit 6159fed

Browse files
authored
Add files via upload
1 parent d29c9e2 commit 6159fed

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Day9/ConvertStringToInteger_sb.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def solution(s):
2+
answer = int(s)
3+
return answer
4+
5+
str1 = "1234"
6+
str2 = "-1234"
7+
8+
print(solution(str1))
9+
print(solution(str2))

Day9/FindKim_sb.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def solution(seoul):
2+
answer = seoul.index("Kim")
3+
return "김서방은 " + str(answer) + "에 있다"
4+
5+
s1 = ["Jane", "Kim"]
6+
print(solution(s1))

Day9/Watermallon_sb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def solution(n):
2+
answer = '수박'*(n//2)+'수'*(n%2)
3+
return answer
4+
5+
n1 = 3
6+
n2 = 4
7+
print(solution(n1))
8+
print(solution(n2))

0 commit comments

Comments
 (0)