CS50

Coding 수업정리/CS50

CS50-03-snackbar (chat gpt 분석)

https://cs50.harvard.edu/x/2023/problems/3/snackbar/ Snackbar - CS50x 2023 Harvard University's introduction to the intellectual enterprises of computer science and the art of programming. cs50.harvard.edu 대답, 코드부분은 +더보기를 누르시면 나옵니다! 아래는 내가 작성한, 오류가 나는 코드이다. 더보기 // Practice using structs // Practice writing a linear search function /** * Beach Burger Shack has the following 10 items on their menu..

Coding 수업정리/CS50

CS50-04-license chat gpt 질문으로 이해하는 동적할당과 해제

글이 너무 길어져서, 대답 부분과 코드 부분을 접어두었습니다. 접힌 부분 누르면 내용이 나옵니다. License - CS50x 2023 Harvard University's introduction to the intellectual enterprises of computer science and the art of programming. cs50.harvard.edu 이 부분이 너무 이해가 안가는데, 어디서부터 검색을 해야할지 막막했다. 마침 chat gpt가 생각나서 컴공과 친구가 옆에 앉아있다고 생각하고 질문을 해보기로 했다. 연습문제와 개념 부분만 chat gpt에게 물어보고, 제출하는 과제에는 절대 사용하지 않을 예정이다. 우선 아래와 같이 코드를 짜줬는데, 이해가 안가는 부분을 여러 단계에 걸쳐..

Coding 수업정리/CS50

CS50-03-Algorithm-Sections

https://cs50.harvard.edu/x/2023/sections/3/ Week 3 Algorithms - CS50x 2023 Harvard University's introduction to the intellectual enterprises of computer science and the art of programming. cs50.harvard.edu 좌측에 괄호 안 부분을 attribute 혹은 field 라고 부른다. + 좌측처럼 candidate를 연속으로 몇번 물어보면서 데이터를 체우게 할 수도 있음 for loop 특정 숫자에 접근하려면 점으로 해서 순서로 특정할수 있음. Recursion 재귀 예시 : Factorial 좌측과 같이 표현 가능함. 좌측보다도 (미완성임) 더 길게 ..

kthdev
'CS50' 태그의 글 목록