Created
January 17, 2020 03:19
-
-
Save parksunwoo/8b1180d91a7a0536aca8285a6997dafb to your computer and use it in GitHub Desktop.
lecture1_code_test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
channels: | |
- defaults | |
dependencies: | |
- ipython | |
- ipywidgets | |
- matplotlib | |
- numpy | |
- scipy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"안녕, 파이썬\n" | |
] | |
} | |
], | |
"source": [ | |
"print('안녕, 파이썬')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"나는 단팥빵 2 개를 먹었다.\n" | |
] | |
} | |
], | |
"source": [ | |
" print('나는 단팥빵 2 개를 먹었다.')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"숫자를 입력하세요: 20\n", | |
"나는 단팥빵 20 개를 먹었다.\n" | |
] | |
} | |
], | |
"source": [ | |
"bread = int(input(\"숫자를 입력하세요: \"))\n", | |
"print('나는 단팥빵',bread,'개를 먹었다.')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"숫자를 입력하세요: 30\n", | |
"나는 단팥빵 31 개를 먹었다.\n" | |
] | |
} | |
], | |
"source": [ | |
"bread = int(input(\"숫자를 입력하세요: \"))\n", | |
"print('나는 단팥빵',bread+1,'개를 먹었다.')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"숫자를 입력하세요: 40\n", | |
"나는 단팥빵 41 개를 먹었다.\n" | |
] | |
} | |
], | |
"source": [ | |
"a='나는 단팥빵'\n", | |
"bread = int(input(\"숫자를 입력하세요: \"))\n", | |
"b='개를 먹었다.'\n", | |
"print(a,bread+1,b)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"첫번째 숫자를 입력하세요: 20\n", | |
"두번째 숫자를 입력하세요: 30\n", | |
"세번째 숫자를 입력하세요: 11\n", | |
"[20, 30, 11]\n" | |
] | |
} | |
], | |
"source": [ | |
"first = int(input(\"첫번째 숫자를 입력하세요: \"))\n", | |
"second = int(input(\"두번째 숫자를 입력하세요: \"))\n", | |
"third = int(input(\"세번째 숫자를 입력하세요: \"))\n", | |
"\n", | |
"a=[first, second, third]\n", | |
"print(a)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"첫번째 음식을 입력하세요: 치킨\n", | |
"두번째 음식을 입력하세요: 짜장면\n", | |
"세번째 음식을 입력하세요: 도시락\n" | |
] | |
} | |
], | |
"source": [ | |
"fi = input(\"첫번째 음식을 입력하세요: \")\n", | |
"se = input(\"두번째 음식을 입력하세요: \")\n", | |
"th = input(\"세번째 음식을 입력하세요: \")\n", | |
"fo = input(\"세번째 음식을 입력하세요: \")\n", | |
"\n", | |
"#food=['치킨','짜장면','도시락','탕수육']\n", | |
"food = [fi, se, th, fo]\n", | |
"print('나는', food[1], '이 먹고 싶어요') " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"나는 치킨 이 먹고 싶어요\n" | |
] | |
} | |
], | |
"source": [ | |
"food=['치킨','짜장면','도시락','탕수육']\n", | |
"print('나는', food[0], '이 먹고 싶어요')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "python3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.7" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment