Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STEP 2 - 아이스크림 그리기 #1001

Open
wants to merge 1 commit into
base: ss_20_SoPa
Choose a base branch
from

Conversation

sopa3344
Copy link

for 문을 활용해 아이스크림을 그렸습니다


problem

  1. git을 푸쉬를 할 때마다 너무 어렵습니다... (정확하게 한지 모르겠음)

Copy link

@jaemuYeo jaemuYeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프로젝트 진행하시느라 고생많으셨습니다!
깃헙도 잘 다루시는 것 같아요 👍
Push 잘 왔습니다 :)

스텝2의 실행결과는 예시와 같으나 조금 더 수정하면 좋을 부분이 있어 코멘트 남겨두어요.
수정 후 코멘트에 저를 태그하고 메시지 남겨주세요!

함수화

프로젝트 Todo에 '아이스크림을 그리는 함수 두 개를 만들어봅시다'라고 명시되어있습니다!
현재 함수가 아닌 for문으로만 구현되어있기에 수정해보셔요.

순서도

순서도는 간략하지만 명확하게 전달이 되어야해요!
지금은 간략하지만 로직을 파악하기에는 조금 어려움이 있습니다!
순서도 작성 전 먼저 의사코드로 작성해보면 좋을 것 같아요.

EX
시작
1. 아이스크림 몸통 그리기 실행
2. 아이스크림 몸통의 높이가 8인가?
3. 아니라면 1로 돌아가기
4. 맞다면 5로 넘어가기
5. 아이스크림 막대기 그리기 실행
6. 아이스크림의 몸통의 높이가 4인가?
7. 아니라면 5로 돌아가기
8. 맞다면 9로 넘어가기
9. 종료

이 것을 도형화 시켜보면 좋겠네요 :)
(꼭 변수명과 함수명이 포함되지 않아도 됩니다! ㅇㅇ 실행 이렇게 간단하게 해주어도 좋아요)

@@ -8,5 +8,14 @@

import Foundation

print("Hello, World!")
let iceCreamBody = "***********"
let iceCreamStick = " | | "

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

막대기 뒤의 공백은 불필요해 보입니다!
띄어쓰기또한 메모리를 잡아먹기에 불필요한 공백또한 지워주는게 좋아요 :)

let iceCreamBody = "***********"
let iceCreamStick = " | | "

for _ in 1...8{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

모든 부분에서 중괄호의 앞은 한 번 띄어쓰기가 컨벤션입니다!

let iceCreamStick = " | | "

for _ in 1...8{
print("\(iceCreamBody)")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문자열 보간법 잘 활용해주셨군요 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants