백준 단계별로 풀어보기 - 고양이(10171번) with Python
문제(https://www.acmicpc.net/problem/10171)
아래 예제와 같이 고양이를 출력하시오.
예제 입력 : 없음
예체 출력 :
\ /\
) ( ')
( / )
\(__) |
문제 포인트 : print() 활용 & \다음에 오는 문자 조심
코드1:
print("\ /\ ")
print(" ) ( ' )")
print("( / )")
print(" \(__)|")
*관련 문법 정리
https://multitasker-sh.tistory.com/1
[Python] print( ) & 문자열 (str) 1번째 (2557번, 10718번)
print( ) 1) 숫자 출력 ex) print(45) >>>45 1-1) 연산한 결과 출력 ex) print(4+5) >>>9 2) 문자(열) 출력 ex) print("Python Coding") >>>Python Coding print("1+5") >>>1+5 3) 변수 출력 ex) words = "Hello" print(words) >>>Hello 4) 변수 + 문
multitasker-sh.tistory.com
https://multitasker-sh.tistory.com/2
[Python] print( ) & 문자열 (str) 2번째 (10718번, 10172번)
print 1)print("Hello word")은 print("Hello word", end='\n')와 같다 \n => 개행(enter) print("Hello world"여기) 여기에 특별한 값을 넣지 않으면 print문이 수행되고 끝에 \n(enter)가 들어간다. ex)print("Hello") print() print("wo
multitasker-sh.tistory.com