Professional Documents
Culture Documents
9장 (2) 반복문while (실습) PDF
9장 (2) 반복문while (실습) PDF
1
실습: 제출 파일 목록
(실습10)
파이썬 Script 파일명: 이름_실습10.py
사이버 캠퍼스 제출
실습10 제출항목에 제출
2
실습10
3
실습10
☻ 실행 예시 화면
***** 문제1 *****
정수를 입력하세요. 0입력시 종료!
90
59
input()을 반복
100
85
70
95
0 #분홍색 키보드 입력값
평균 83.2 #파란색 문자열 출력
#빨간색 변수 또는 계산 값
4
실습 10
☻ 실행 예시 화면
***** 문제2 *****
소수인지 확인하고 싶은 수? 11
소수!!
소수인지 확인하고 싶은 수? 124
소수아님!! #하늘색 프롬프트(안내문구)
소수인지 확인하고 싶은 수? 0 #분홍색 키보드 입력값
종료합니다 #파란색 문자열 출력
5
실습 10
God saw all that he had made, and it was very good.
And there was evening, and there was morning--the
sixth day.
특수문자를 space로 바꿈
God saw all that he had made and it was very good
And there was evening and there was morning the
sixth day
새 문자열을 출력해본다.
6
실습 10
(문제3) 실행 중간 결과 예시
☻ 실행 중간 결과 예시 화면
입력하세요
God saw all that he had made, and it was very good. And there
was evening, and there was morning--the sixth day.
** 특수문자를 공백으로 바꾼 새 문자열
God saw all that he had made and it was very good And there
was evening and there was morning the sixth day
#하늘색 프롬프트(안내문구)
#분홍색 키보드 입력값
#파란색 문자열 출력
#빨간색 변수의 값
7
실습 10
God saw all that he had made and it was very good And
there was evening and there was morning the sixth day
☻ 실행 중간 결과 예시 화면
** 단어별 빈도수
God 1
saw 1
all 1
that 1
he 1
had 1
made 1
and 2
it 1
was 3
very 1
good 1
And 1
there 2
evening 1
morning 1
the 1
sixth 1 #파란색 문자열 출력
day 1 #빨간색 변수의 값 9
실습 10
☻ 실습3- 실행 전체 결과 예시 화면
입력하세요
God saw all that he had made, and it was very good. And there was
evening, and there was morning--the sixth day.
** 특수문자를 공백으로 바꾼 새 문자열
God saw all that he had made and it was very good And there was
evening and there was morning the sixth day
** 단어별 빈도수
God 1
saw 1
all 1
that 1
he 1
had 1
made 1
and 2
it 1
was 3
very 1
good 1
And 1
there 2 #하늘색 프롬프트(안내문구)
evening
morning
1
1
#분홍색 키보드 입력값
the 1 #파란색 문자열 출력
sixth 1
day 1 #빨간색 변수의 값 10