Skip to content

Commit 985e5b9

Browse files
committed
up
1 parent bd3d2c2 commit 985e5b9

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

starting.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,10 +3437,10 @@
34373437
":::{note} 주피터 노트북 코드셀에서의 출력\n",
34383438
"\n",
34393439
"주피터 노트북에서 코드셀 마지막 줄의 표현식 은 `print()` 없이도 결과가 화면에 표시될 수 있다.\n",
3440-
"실행결과를 바로 확인하도록 도와주는 기능일 뿐 코드의 내용이 달라지지는 않는다.\n",
3440+
"마지막 줄의 실행결과를 `print()` 함수 없이 바로 확인하도록 도와주는 기능으로 작동한다.\n",
34413441
"반면에 스크립트라고 불리는 `.py` 확장자를 갖는 파이썬 소스코드 파일을 실행할 때는 보통 `print()` 함수를 함께 써야만 화면에 출력된다.\n",
34423442
"\n",
3443-
"처음에는 헷갈리면 언제나 `print()`로 결과를 확인해도 된다.\n",
3443+
"지금은 가급적 `print()`로 결과를 확인할 것을 추천한다.\n",
34443444
":::"
34453445
]
34463446
},

values.ipynb

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,35 @@
306306
"print(type(kgh))"
307307
]
308308
},
309+
{
310+
"cell_type": "markdown",
311+
"metadata": {},
312+
"source": [
313+
":::{note} `print()` 함수가 화면에 출력하는 값\n",
314+
"\n",
315+
"`print()` 함수는 값을 계산하지 않고 주어진 값을 화면에 출력만 하는데\n",
316+
"출력 양식은 값의 종류, 즉 자료형에 따라 다르다.\n",
317+
"예를 들어 문자열만 출력할 때는 따옴표를 보여주지 않는다.\n",
318+
"\n",
319+
"```python\n",
320+
"apple = \"사과\"\n",
321+
"print(apple)\n",
322+
"---------------\n",
323+
"사과\n",
324+
"```\n",
325+
"\n",
326+
"반면에 문자열이 리스트 등에 포함되어 있으면 문자열이라는 것이 확인되어야 하기에 원래대로 따옴표를 보여준다.\n",
327+
"\n",
328+
"```python\n",
329+
"apple = \"사과\"\n",
330+
"kgh_info = [7, apple, 58.3]\n",
331+
"print(kgh_info)\n",
332+
"---------------\n",
333+
"[7, \"사과\", 58.3]\n",
334+
"```\n",
335+
":::"
336+
]
337+
},
309338
{
310339
"cell_type": "markdown",
311340
"id": "8a9c75b7-5dc0-48e0-90e3-cef247a53987",
@@ -4987,7 +5016,7 @@
49875016
"name": "python",
49885017
"nbconvert_exporter": "python",
49895018
"pygments_lexer": "ipython3",
4990-
"version": "3.12.12"
5019+
"version": "3.13.12"
49915020
},
49925021
"toc": {
49935022
"base_numbering": 1,

0 commit comments

Comments
 (0)