SlideShare a Scribd company logo
1 of 20
자국어 코딩 글로리
실습 자료 (1,2,3회+차)
2015-1-30
생활컴퓨팅 (개설자: 김성진Ph.D)
1회차
코딩 글로리를 운영하는 기본 명령어를 익
힌다.
제 1회차 - 1
• 코딩 글로리에 들어간다.
[방법1] $python3 glory.py
[방법2] Python3 IDLE 실행 - glory.py 열기 - glory.py 실
행
• 어떤 명령어를 지원하는지 알아본다.
]도움말
• 종료한다.
]종료
제 1회차 - 2
• 코딩 글로리는 베이직 언어를 기반으로 한다.
– 쉽고 재미있는 Applesoft 베이직 방식 사용함
• 새로운 프로그램을 시작한다.
]신규 첫프로그램
• 한 줄 짜리 프로그램을 만든다. 코드 수행 순서를 표시하
는 문번호를 앞에 붙인다.
]10 0을 출력하라
• 만든 프로그램을 실행한다. 실행하면 어떤 결과가 나올지
상상해 본다.
]실행
● 푸른색: 입력창 명령어
● 붉은색: 베이직 키워드
제 1회차 - 3
• 만든 프로그램의 내용을 본다.
]내용
• 만든 프로그램을 저장한다.
]저장
• 제대로 저장이 되었는지 목록을 확인한다.
]목록
• 실습: 2를 찍는 프로그램을 만들고, 실행하고, 내용을 보
고, 저장하고 목록을 확인하시오.
제 1회차 - 3
• 새로운 프로그램을 만든다.
]신규 두번째프로그램
• 새로운 프로그램의 내용을 본다.
]내용
• 새로운 프로그램을 작성한다. 1+2를 출력한다.
]10 1+2를 출력하라
• 작성한 프로그램을 실행하고, 내용을 확인하고, 저장한 후
목록을 확인한다.
– 실행 → 내용 → 저장 → 목록
• 실습: 뺄샘, 곱셈, 나눗셈을 하는 코드를 추가하시오
제 1회차 - 4
• 실습2: 세번째 프로그램을 신규로 만들어 본인이 원하는
결과를 찍는 코드를 작성하고 실행 후 저장하여 목록을 확
인하시오.
제 1회차 - 5
• 지금까지 어떤 프로그램들이 저장되었는지 목록을 본다.
]목록
• 첫프로그램을 다시 불러온다.
]이전 첫프로그램
• 첫프로그램에 저장된 내용을 확인한다.
]내용
• 불러온 첫프로그램을 실행한다.
]실행
제 1회차 - 6
• 첫프로그램의 끝에 (3*4)를 찍는 문장을 추가하고 수행한
다.
]40 3*4를 출력하라
]내용
]실행
]저장
]목록
• 파이썬한글베이직을 종료한다.
]종료
제 1회차 - 정리
• 학습한 명령어들
– 신규: 새로운 프로그램을 시작하다
– 저장: 만든 프로그램을 저장하다.
– 목록: 신규로 만든 프로그램 목차
– 내용: 프로그램내용을 확인해 본다.
– 이전: 찾고 싶은 프로그램을 가져온다.
– 종료: 프로그램을 마치다.
• 학습한 키워드
– ~를 출력하라
2회차
코딩 글로리의 기본 키워드들을 문제를 통해 익
힌다.
제 2회차 - 1
• 목표: 더하기라는 프로그램을 만든다.
– 더하기는 두 숫자를 입력 받아 합친 결과를 내보내는
프로그램이다.
• 신규로 더하기 프로그램을 지정한다.
]신규 더하기
• 숫자 하나를 가라는 변수에 입력하는 코드를 작성하고 실
행한다.
]10 가에 입력하라
]실행
• 가라는 변수에 들어간 값을 찍는 코드를 작성하고 실행한
다.
]20 가를 출력하라
]실행
제 2회차 - 2
• 코드: 가와 나라는 변수에 각각 숫자를 입력 받고 두 값을
각각 찍어라
– 10 “가는 얼마인가?”를 출력하라
– 20 가에 입력하라
– 30 “가는”; 가; “이다.”를 출력하라
– 40 “나는 얼마인가?”를 출력하라
– 50 나에 입력하라
– 60 “나는”; 나; “이다.”를 출력하라
제 2회차 - 3회
• 가와 나를 더해서 다에 넣고, 다에 들어간 결과를 찍는다.
– 70 다 = 가 + 나
– 80 “가와 나를 더하면”; 다;”이 된다.”를 출력하라
제 2회차 - 정리
• 학습한 키워드
– ~를 출력하라
– ~를 입력하라
– 다 = 가 + 나
3회차
순환문, 조건문 그리고 호출문을 익힌다.
제 3회차 - 1: 순환문
• 1부터 3까지 연속으로 출력하라.
10 1을 출력하라
20 2를 출력하라
30 3을 출력하라
• 순환문을 사용하여 1부터 10까지 출력하라.
50 가=1부터 10까지 돌려라
60 가를 출력하라
70 가의 다음
제 3회차 - 2: 조건문
• 가에 숫자를 입력 받아 그 값을 출력하라.
10 가에 입력하라
20 가를 출력하라
• 의문문을 사용하여 값이 3인지 검사하라.
50 가에 입력하라
60 가=3이라면 100으로 가기를 하라
70 "가는 3이 아니다."를 출력하라
80 끝내라
100 "가는 3이다."를 출력하라
제 3회차 - 3: 호출문
• 가에 입력하고 출력하는 것을 2회 실시하라
10 가에 입력하라
20 가를 출력하라
30 가에 입력하라
40 가를 출력하라
• 호출문을 사용하여 반복구를 제거한다.
50 100에 갔다와라
60 100에 갔다와라
70 끝내라
100 가에 입력하라
110 가를 출력하라
120 돌아가라
제 3회차 - 예제: 구구단 게임
● 글로리는 기본 내장함수를 지원
한다.
○ RND(), INT() 등
● 예제: 입/출력, 조건문/분기문을
활용하여 구구단 게임을 만들라
5 "구구단 게임을 합니다."를 출력하라
10 어떤실수 = RND(7) +2
20 수1 = INT( 어떤실수)
40 어떤실수 = RND(7) + 2
50 수2 = INT( 어떤실수)
70 수1; "*"; 수2; "는 얼마인가요?"를 출력하
라
80 답에 입력하라
90 모범답 = 수1 * 수2
100 답 = 모범답 이라면 130으로 가기를 하라
110 "틀렸어요. 정답은"; 모범답; "입니다."를
출력하라
120 150으로 가라
130 "맞았어요."를 출력하라
150 "게임을 또 할까요 (1=예, 0=아니오)";를
출력하라
155 게임다시에 입력하라
160 게임다시 = 1 이라면 10으로 가기를 하라
200 "구구단 게임을 종료합니다."를 출력하라

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

코딩 글로리 교육 자료 (1,2,3+회차) : 구구단 예제

  • 1. 자국어 코딩 글로리 실습 자료 (1,2,3회+차) 2015-1-30 생활컴퓨팅 (개설자: 김성진Ph.D)
  • 2. 1회차 코딩 글로리를 운영하는 기본 명령어를 익 힌다.
  • 3. 제 1회차 - 1 • 코딩 글로리에 들어간다. [방법1] $python3 glory.py [방법2] Python3 IDLE 실행 - glory.py 열기 - glory.py 실 행 • 어떤 명령어를 지원하는지 알아본다. ]도움말 • 종료한다. ]종료
  • 4. 제 1회차 - 2 • 코딩 글로리는 베이직 언어를 기반으로 한다. – 쉽고 재미있는 Applesoft 베이직 방식 사용함 • 새로운 프로그램을 시작한다. ]신규 첫프로그램 • 한 줄 짜리 프로그램을 만든다. 코드 수행 순서를 표시하 는 문번호를 앞에 붙인다. ]10 0을 출력하라 • 만든 프로그램을 실행한다. 실행하면 어떤 결과가 나올지 상상해 본다. ]실행 ● 푸른색: 입력창 명령어 ● 붉은색: 베이직 키워드
  • 5. 제 1회차 - 3 • 만든 프로그램의 내용을 본다. ]내용 • 만든 프로그램을 저장한다. ]저장 • 제대로 저장이 되었는지 목록을 확인한다. ]목록 • 실습: 2를 찍는 프로그램을 만들고, 실행하고, 내용을 보 고, 저장하고 목록을 확인하시오.
  • 6. 제 1회차 - 3 • 새로운 프로그램을 만든다. ]신규 두번째프로그램 • 새로운 프로그램의 내용을 본다. ]내용 • 새로운 프로그램을 작성한다. 1+2를 출력한다. ]10 1+2를 출력하라 • 작성한 프로그램을 실행하고, 내용을 확인하고, 저장한 후 목록을 확인한다. – 실행 → 내용 → 저장 → 목록 • 실습: 뺄샘, 곱셈, 나눗셈을 하는 코드를 추가하시오
  • 7. 제 1회차 - 4 • 실습2: 세번째 프로그램을 신규로 만들어 본인이 원하는 결과를 찍는 코드를 작성하고 실행 후 저장하여 목록을 확 인하시오.
  • 8. 제 1회차 - 5 • 지금까지 어떤 프로그램들이 저장되었는지 목록을 본다. ]목록 • 첫프로그램을 다시 불러온다. ]이전 첫프로그램 • 첫프로그램에 저장된 내용을 확인한다. ]내용 • 불러온 첫프로그램을 실행한다. ]실행
  • 9. 제 1회차 - 6 • 첫프로그램의 끝에 (3*4)를 찍는 문장을 추가하고 수행한 다. ]40 3*4를 출력하라 ]내용 ]실행 ]저장 ]목록 • 파이썬한글베이직을 종료한다. ]종료
  • 10. 제 1회차 - 정리 • 학습한 명령어들 – 신규: 새로운 프로그램을 시작하다 – 저장: 만든 프로그램을 저장하다. – 목록: 신규로 만든 프로그램 목차 – 내용: 프로그램내용을 확인해 본다. – 이전: 찾고 싶은 프로그램을 가져온다. – 종료: 프로그램을 마치다. • 학습한 키워드 – ~를 출력하라
  • 11. 2회차 코딩 글로리의 기본 키워드들을 문제를 통해 익 힌다.
  • 12. 제 2회차 - 1 • 목표: 더하기라는 프로그램을 만든다. – 더하기는 두 숫자를 입력 받아 합친 결과를 내보내는 프로그램이다. • 신규로 더하기 프로그램을 지정한다. ]신규 더하기 • 숫자 하나를 가라는 변수에 입력하는 코드를 작성하고 실 행한다. ]10 가에 입력하라 ]실행 • 가라는 변수에 들어간 값을 찍는 코드를 작성하고 실행한 다. ]20 가를 출력하라 ]실행
  • 13. 제 2회차 - 2 • 코드: 가와 나라는 변수에 각각 숫자를 입력 받고 두 값을 각각 찍어라 – 10 “가는 얼마인가?”를 출력하라 – 20 가에 입력하라 – 30 “가는”; 가; “이다.”를 출력하라 – 40 “나는 얼마인가?”를 출력하라 – 50 나에 입력하라 – 60 “나는”; 나; “이다.”를 출력하라
  • 14. 제 2회차 - 3회 • 가와 나를 더해서 다에 넣고, 다에 들어간 결과를 찍는다. – 70 다 = 가 + 나 – 80 “가와 나를 더하면”; 다;”이 된다.”를 출력하라
  • 15. 제 2회차 - 정리 • 학습한 키워드 – ~를 출력하라 – ~를 입력하라 – 다 = 가 + 나
  • 16. 3회차 순환문, 조건문 그리고 호출문을 익힌다.
  • 17. 제 3회차 - 1: 순환문 • 1부터 3까지 연속으로 출력하라. 10 1을 출력하라 20 2를 출력하라 30 3을 출력하라 • 순환문을 사용하여 1부터 10까지 출력하라. 50 가=1부터 10까지 돌려라 60 가를 출력하라 70 가의 다음
  • 18. 제 3회차 - 2: 조건문 • 가에 숫자를 입력 받아 그 값을 출력하라. 10 가에 입력하라 20 가를 출력하라 • 의문문을 사용하여 값이 3인지 검사하라. 50 가에 입력하라 60 가=3이라면 100으로 가기를 하라 70 "가는 3이 아니다."를 출력하라 80 끝내라 100 "가는 3이다."를 출력하라
  • 19. 제 3회차 - 3: 호출문 • 가에 입력하고 출력하는 것을 2회 실시하라 10 가에 입력하라 20 가를 출력하라 30 가에 입력하라 40 가를 출력하라 • 호출문을 사용하여 반복구를 제거한다. 50 100에 갔다와라 60 100에 갔다와라 70 끝내라 100 가에 입력하라 110 가를 출력하라 120 돌아가라
  • 20. 제 3회차 - 예제: 구구단 게임 ● 글로리는 기본 내장함수를 지원 한다. ○ RND(), INT() 등 ● 예제: 입/출력, 조건문/분기문을 활용하여 구구단 게임을 만들라 5 "구구단 게임을 합니다."를 출력하라 10 어떤실수 = RND(7) +2 20 수1 = INT( 어떤실수) 40 어떤실수 = RND(7) + 2 50 수2 = INT( 어떤실수) 70 수1; "*"; 수2; "는 얼마인가요?"를 출력하 라 80 답에 입력하라 90 모범답 = 수1 * 수2 100 답 = 모범답 이라면 130으로 가기를 하라 110 "틀렸어요. 정답은"; 모범답; "입니다."를 출력하라 120 150으로 가라 130 "맞았어요."를 출력하라 150 "게임을 또 할까요 (1=예, 0=아니오)";를 출력하라 155 게임다시에 입력하라 160 게임다시 = 1 이라면 10으로 가기를 하라 200 "구구단 게임을 종료합니다."를 출력하라