Jumi Yang

add exit program

1 +{
2 + "cells": [
3 + {
4 + "cell_type": "code",
5 + "execution_count": 1,
6 + "metadata": {},
7 + "outputs": [
8 + {
9 + "name": "stdout",
10 + "output_type": "stream",
11 + "text": [
12 + "'exit' 입력시 프로그램이 종료됩니다.exit\n"
13 + ]
14 + }
15 + ],
16 + "source": [
17 + "x = input(\"'exit' 입력시 프로그램이 종료됩니다.\")\n",
18 + "\n",
19 + "if x == 'exit':\n",
20 + " exit()"
21 + ]
22 + }
23 + ],
24 + "metadata": {
25 + "kernelspec": {
26 + "display_name": "Python 3",
27 + "language": "python",
28 + "name": "python3"
29 + },
30 + "language_info": {
31 + "codemirror_mode": {
32 + "name": "ipython",
33 + "version": 3
34 + },
35 + "file_extension": ".py",
36 + "mimetype": "text/x-python",
37 + "name": "python",
38 + "nbconvert_exporter": "python",
39 + "pygments_lexer": "ipython3",
40 + "version": "3.8.3"
41 + }
42 + },
43 + "nbformat": 4,
44 + "nbformat_minor": 4
45 +}