[Swift] Playgrounds Learn to Code 1-01. Commands

BOMY·2022년 8월 2일

Playgrounds

목록 보기
1/6
post-thumbnail

<TIL 작성 목표>

  • Playgrounds Learn to Code 1, 2의 챕터, 목차를 내 언어로, 한 문장으로 설명할 수 있을 때까지 해보기! 초등학생한테 이해시킬 수 있을 정도로!
  • 주변 개념까지 정리하고 Playground의 설명으로 충분하지 않으면 검색해서 찾아보고 내 생각을 찾아서 정리해 보기!
    ex) 논리 연산자가 뭐예요? 왜 써요? 종류는요?


나의 iOS 개발 커리큘럼

  • Playgrounds Learn to Code 1
    - Commands ✔
    - Functions
    - For loops
    - Conditional Code
    - Logical Operators
    - While Loops
    - Algorithms
  • Playgroubds Learn to Code 2
    - Variables
    - Types
    - Initialization
    - Parameters
    - World Building
    - Arrays
  • iOS App Dev Tutorials - 3개월간 2~3회독
  • Boostcourse - 6개월


Playground Learn to Code 1

👉 Commands (명령어)

  • Command is Code that tells an application to perform a specific action. 명령어는 특정한 행위를 수행하기 위한 동작이나 행동을 말하는 코드이다.

    Have you ever followed a recipe to bake something delicious?
    or followed instructions to assemble something cool?
    
    You need to follow the instructions in the correct order,
    or you'll end up with something ... unexpected.
    
    Writing code allows you to create your own set of instructions
    for your device to carry out.
    
    Your goal is to figure out which instructions, in which order,
    will result in something great.
    
    You'll start by writing commands to move a character named Byte
    around a puzzle world, performing tasks.
  • Notice the mashed-together words? Code is punctuated and spaced like human languages, but commands have no spaces between words. And Commands always end in parentheses.

  • ex) CollectGem()

  • Commands part words

    • application: the action of putting something into operation.
      어떤것을 작동시키기 위한 동작/행동
    • instructions: detailed information telling how something should be done, operated, or assembled.
      어떻게 해야 하는지나 수행하는지에 대한 상세 정보 (명령, 훈련)
    • assemble: fit together the separate component parts of (a machine or other object).
      어떤 물건이나 기계의 분리된 구성요소 부분들을 결합하다 (모으다, 조립하다)
    • end up with ~: To possess something at the end or as a result of something else.
      결국 어떤것을 소유하는 것 혹은 어떤 것의 결과 (결국 ~하다, 결국 ~를 갖게 되다)
    • carry out: perform a task.
      수행하다
    • figure out: solve a problem or discover the answer to a question.
      문제를 해결하다, 질문에 대한 답을 찾다
    • in ~ order: according to a particular sequence.
      특정 순서를 따르다
    • sequence: a series of related things or events, or the order in which they follow each other
      관련된 일이나 사건들, 그들이 따르는 순서

👉 한 줄로 요약한 Command

Command(명령어)프로그램이 어떠한 동작을 하기 위해 명령을 하는 코드이다.
ex) 앞으로 움직여! -> moveForward()

  • 추가적으로, 코드는 사람의 언어처럼 문장부호나 띄어쓰기가 있지만 명령어는 두 단어 사이에 공백이 있어서는 안 되고, 괄호'()'로 끝난다.



22.08.02 TIL 끝!


썸네일은 Banner Maker로 제작하였습니다.

profile
한 걸음 한 걸음!

0개의 댓글