Ipynb
AI-enhanced title
"cells": [ { "cell_type": "code", "execution_count": 1, "id": "a8f68efe", "metadata": {}, "outputs": [], "source": [ "import os" ] }, { "cell_type": "code", "execution_count": 2, "id": "ed7e7e85", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'F:\\\\GoogleDrive\\\\Jupyter\\\\2024 년 SW 와 인공지능 2 반'" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "os.getcwd()" ] }, { "cell_type": "code", "execution_count": 1, "id": "15aeb4eb", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1267650600228229401496703205376" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "2 ** 100" ] }, { "cell_type": "code", "execution_count": 2, "id": "c65ad70c", "metadata": {}, "outputs": [ { "data": { "text/plain": [
"10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "2**1000" ] }, { "cell_type": "code", "execution_count": 4, "id": "99e6ae4b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "조행래\n" ] } ], "source": [ "print(\"조행래\")" ] }, { "cell_type": "code", "execution_count": 5, "id": "e4709509", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "32" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "2**5" ] }, { "cell_type": "code", "execution_count": 6, "id": "d79b6b81", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "5 - (3 - 1)" ] }, { "cell_type": "code", "execution_count": 8, "id": "7e854eca", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "5.0\n", "20\n" ] } ], "source": [ "print(10 / 2)\n", "print(10 * 2)" ] }, { "cell_type": "code", "execution_count": 14, "id": "846bd10f", "metadata": {}, "outputs": [ { "ename": "NameError", "evalue": "name 'HelloWorld' is not defined", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mNameError\u001b[0m Traceback(most recent call last)", "\u001b[1;32m<ipython-input-14-bc9faaae1e35>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mHelloWorld\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[1;31mNameError\u001b[0m: name 'HelloWorld' is not defined" ] } ], "source": [ "HelloWorld" ] }, { "cell_type": "code", "execution_count": 10, "id": "bc282103", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "5" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "5" ] }, { "cell_type": "code", "execution_count": 12, "id": "f1549b0c", "metadata": {}, "outputs": [], "source": [ "Hello = 5" ] }, { "cell_type": "code", "execution_count": 13, "id": "f27adbb7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "5" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Hello" ]},{ "cell_type": "code", "execution_count": 15, "id": "9191c704", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3.0625" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(2 * 4.0 + 3 * 3.5 + 3 * 2) / 8" ]},{ "cell_type": "code", "execution_count": 16, "id": "cc0f812c", "metadata": {}, "outputs": [], "source": [ "x, y = -2, 5" ]},{ "cell_type": "code", "execution_count": 17, "id": "605db604", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2x - 5y = -29\n" ] } ], "source": [ "print(f\"2x - 5y = {2*x - 5*y}\")" ]},{ "cell_type": "code", "execution_count": 18, "id": "02a11cba", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-2/x + y/2 = 3.5\n" ] } ], "source": [ "print(f\"-2/x + y/2 = {-2/x + y/2}\")" ]},{ "cell_type": "code", "execution_count": 19, "id": "2df64469", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "x^y - 2xy = -12\n", "(2x+y) / (x-2y) = -0.08333333333333333\n" ] } ], "source": [ "print(f\"x^y - 2xy = {x**y - 2*x*y}\")\n", "print(f\"(2x+y) / (x-2y) = {(2*x + y) / (x - 2*y)}\")" ]},{ "cell_type": "code", "execution_count": 20, "id": "0708da82", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요좋아요\n", "Gooooooooooooooooooood\n" ] } ], "source": [ "print(\"좋아요\" * 10)\n", "print(\"G\" + \"o\" * 20 + \"d\")" ]},{ "cell_type": "code", "execution_count": 22, "id": "70330a1a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "아름다운 우리나라. 아름다운 우리나라. 아름다운 우리나라. 아름다운 우리나라. 아름다운 우리나라. \n" ] } ], "source": [ "x = \"아름다운\"\n", "y = \"우리나라\"\n", "print((x + \" \" + y + \". \") * 5)" ] }, { "cell_type": "code", "execution_count": null, "id": "c879334c", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.9.1" } }, "nbformat": 4, "nbformat_minor": 5}