Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Python 몫
- Split
- Modified Date
- python3
- Unknown command: cask
- 알고리즘 풀이
- COUNT
- set to list
- string
- List 초기화
- 피보나치 수
- list.sorted()
- Python
- Boto3
- 프로그래머스
- index
- List
- Algorithm
- sort()
- Python 나머지
- permutations
- homebrew-core is a shallow clone.
- RecursionError
- cask
- list.pop(0)
- List to String
- sting position
- zip()
- list to set
- 알고리즘
Archives
- Today
- Total
데이터와 코드로 세상을 바라봅니다.
[Python3] - for, string add 본문
def solution(N):
answer = ''
type_a = ''
type_b = ''
for i in range (0,N):
type_a = type_a+'*'
if (i==0) or (i==N-1) :
type_b = type_b+'*'
else :
type_b = type_b+' '
for j in range (0,N):
if (j==0) or (j==N-1) :
answer = answer+type_a+'\n'
else :
answer = answer+type_b+'\n'
return answer[:-1]
[문제] 별 찍기 - 2
[문제 설명]
첫번째 줄에서 N번째 줄까지 다음과 같은 규칙으로 출력한 결과값을 구하여라.
(1 <= N <= 100)
N = 1
*
N = 2
** **
N = 3
*** * * ***
N = 4
**** * * * * ****
'Code > Python' 카테고리의 다른 글
[Python3] - K번째수 (0) | 2020.11.30 |
---|---|
[Python3] LRU(algorithm) - 2018 KAKAO BLIND RECRUITMENT[1차] 캐시 (0) | 2020.11.26 |
[Python3] - String reverse, String split (0) | 2020.11.18 |
[Python3] - String, index, concat, add (0) | 2020.11.16 |
[Python 3] - list(), stack concept, pop(), len(), append() (0) | 2020.11.09 |