Skip to content

Commit bcd7dee

Browse files
committed
Colaboratory를 통해 생성됨
1 parent f864cd8 commit bcd7dee

1 file changed

Lines changed: 160 additions & 0 deletions

File tree

오늘점심뭐먹지.ipynb

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"name": "오늘점심뭐먹지.ipynb",
7+
"provenance": [],
8+
"collapsed_sections": [],
9+
"authorship_tag": "ABX9TyPJWY8megPGONFyknZ1ameG",
10+
"include_colab_link": true
11+
},
12+
"kernelspec": {
13+
"name": "python3",
14+
"display_name": "Python 3"
15+
}
16+
},
17+
"cells": [
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {
21+
"id": "view-in-github",
22+
"colab_type": "text"
23+
},
24+
"source": [
25+
"<a href=\"https://colab.research.google.com/github/blaspheme7/JavaWebProgramming/blob/master/%EC%98%A4%EB%8A%98%EC%A0%90%EC%8B%AC%EB%AD%90%EB%A8%B9%EC%A7%80.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
26+
]
27+
},
28+
{
29+
"cell_type": "code",
30+
"metadata": {
31+
"id": "fnG0ErbB05td",
32+
"colab_type": "code",
33+
"outputId": "ef899e1b-3652-4bf1-becb-2162accf262b",
34+
"colab": {
35+
"base_uri": "https://localhost:8080/",
36+
"height": 602
37+
}
38+
},
39+
"source": [
40+
"print(3+4)\n",
41+
"# joosuck\n",
42+
"# 여러줄주석은 어떤거임?\n",
43+
"\"\"\"\n",
44+
"이렇게\n",
45+
"합니다\n",
46+
"\"\"\"\n",
47+
"a=7\n",
48+
"b=3\n",
49+
"x='hello'\n",
50+
"y='world'\n",
51+
"김나박이=\"김ㅁㄴㅇㄻㄴㅇㄹ박이\"\n",
52+
"print(a+b)\n",
53+
"print(x+' '+y)\n",
54+
"print(김나박이)\n",
55+
"\n",
56+
"# 연산자 (== != 등등\n",
57+
"# list (=arr)\n",
58+
"str1=\"abc\"+\"def\"\n",
59+
"arr=[1,2,3]\n",
60+
"arr[0]\n",
61+
"list_x=\"abcdefghijklmnopqrstuvwxyz\"\n",
62+
"print(list_x[0:9]) #범위 출력 x<=a<y\n",
63+
"print(str1)\n",
64+
"print(str1[-1]) # 뒤에서부터\n",
65+
"\n",
66+
"\n",
67+
"# tuple (리스트인데=constant_상수)\n",
68+
"arr_tuple=(1,2,3,4,5,6,7,8,9,10)\n",
69+
"print(arr_tuple[2])\n",
70+
"\n",
71+
"# dictionary - key&value 쌍\n",
72+
"person={\"name\":\"장백산\",\"day of birth\":\"930218\"}\n",
73+
"print(person)\n",
74+
"print(person[\"name\"])\n",
75+
"print(person.keys()) # 자바처럼 쓰는거 쉽가능 keys, values, items(튜플로 반환) 등\n",
76+
"\n",
77+
"# set - 순서없고 중복안되는 자료형\n",
78+
"s={1,7,3,56}\n",
79+
"print(s)\n",
80+
"\n",
81+
"# 조건문 (if-elif-else), 반복문 (for,while) , 괄호로 묶는게 아니라 들여쓰기로 구분됨\n",
82+
"# null값은 false처리함\n",
83+
"\n",
84+
"i=10\n",
85+
"if i>10:\n",
86+
" print(\"in if\")\n",
87+
"elif i>0:\n",
88+
" print(\"in elif\")\n",
89+
"else:\n",
90+
" print(\"in else\")\n",
91+
"print(\"out of line\")\n",
92+
"\n",
93+
"\n",
94+
"# 반복문 (for) dict의 경우 key를 가져옴\n",
95+
"\n",
96+
"for var in person:\n",
97+
" print(person[var])\n",
98+
"print(\"end for\")\n",
99+
"\n",
100+
"\n",
101+
"# range - 시작부터 끝값까지 해서 \n",
102+
"\n",
103+
"numeric=range(1,11)\n",
104+
"for var in numeric:\n",
105+
" if numeric[var-1]%2!=1:\n",
106+
" print(str(numeric[var-1])+\" is even\")\n",
107+
" else:\n",
108+
" print(str(numeric[var-1])+\" is odd\")\n",
109+
"print(\"end\")\n",
110+
"\n",
111+
"cities=[\"seoul\", \"tokyo\", \"toronto\", \"newyork\"]\n",
112+
"for city in cities:\n",
113+
" if len(city)>5:\n",
114+
" print(city)\n",
115+
"\n",
116+
"print(\"end\")"
117+
],
118+
"execution_count": 59,
119+
"outputs": [
120+
{
121+
"output_type": "stream",
122+
"text": [
123+
"7\n",
124+
"10\n",
125+
"hello world\n",
126+
"김ㅁㄴㅇㄻㄴㅇㄹ박이\n",
127+
"abcdefghi\n",
128+
"abcdef\n",
129+
"f\n",
130+
"3\n",
131+
"{'name': '장백산', 'day of birth': '930218'}\n",
132+
"장백산\n",
133+
"dict_keys(['name', 'day of birth'])\n",
134+
"{56, 1, 3, 7}\n",
135+
"in elif\n",
136+
"out of line\n",
137+
"장백산\n",
138+
"930218\n",
139+
"end for\n",
140+
"1 is odd\n",
141+
"2 is even\n",
142+
"3 is odd\n",
143+
"4 is even\n",
144+
"5 is odd\n",
145+
"6 is even\n",
146+
"7 is odd\n",
147+
"8 is even\n",
148+
"9 is odd\n",
149+
"10 is even\n",
150+
"end\n",
151+
"toronto\n",
152+
"newyork\n",
153+
"end\n"
154+
],
155+
"name": "stdout"
156+
}
157+
]
158+
}
159+
]
160+
}

0 commit comments

Comments
 (0)