codestates / codestates/ds-TIL

[TIL] 오예은_210119

Open
#1,353 0 comments 0 reactions 0 assignees View on GitHub
DSFT01
Dominant language
No language data
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### 키워드
`파이썬` `ProblemSolving` `PseudoCode` `comprehension` `Exception`

### 배운 것
- 프로그래밍에서의 문제 해결 - 문제를 단위별로 쪼개서 해결하기
- 의사코드(pseudo code): 요구사항이나 알고리즘을 해석하기 위해 사용, 프로그램의 크기/난이도/협업형태에 따라 필요성이 달라짐
- Comprehension: 파이썬에만 있는 한줄 기능 구현 방식, 코드 간소화를 위해 사용하며 직관적이고 속도가 빠름
(but, 조건이 복잡해지는 경우 직관성은 떨어지고 메모리 사용량은 늘어나니 상황에 따라 판단 후 사용)
- 지역변수: 해당 변수가 포함된 함수 안에서만 읽을 수 있음 / 전역변수: 하나의 파이썬 파일 전체에서 읽을 수 있음(수정시엔 global 사용)
- 예외처리: exception 조건에 따라 None을 반환하는 경우 그 값을 전달받아 사용하는 과정에서 오류 발생 가능성, 파이썬에서는 None/빈문자열/빈리스트/0을 모두 False로 판단하므로 주의!

### 느낀 점
- 과제에서 예외처리를 하는 부분이 있었는데, 문제에 집중하지 않고 잘못된 값을 입력하면 무조건 다시 입력하게끔 만들고 금방 끝났다고 생각했다.
다 된건가 싶었을 때 이 프로그램이 사용자에게 편한 프로그램일까 생각해보니 아닌 것 같았다. 잘못 입력하더라도 알아서 잡아줄 수 있는 똑똑한 프로그램까진 아니더라도 요구사항은 충족하는 프로그램을 만들려면 정말 고민이 많이 필요한 것 같다.
`=> 과제(가위바위보게임) 코드 다시 작성하기`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the issue body and locate the referenced rock-paper-scissors assignment code; no file or test is named here. Review the stated Python problem-solving, comprehension, and exception-handling notes, then confirm that the rewritten assignment meets its requirements and handles invalid input appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.