{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:31.015571Z", "start_time": "2019-09-18T20:03:30.886261Z" } }, "outputs": [ { "ename": "NameError", "evalue": "name 'time' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNameError\u001b[0m: name 'time' is not defined" ] } ], "source": [ "time.sleep(1)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:34.406992Z", "start_time": "2019-09-18T20:03:34.403865Z" } }, "outputs": [], "source": [ "import time" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:35.702309Z", "start_time": "2019-09-18T20:03:34.692908Z" } }, "outputs": [], "source": [ "time.sleep(1)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:35.752728Z", "start_time": "2019-09-18T20:03:35.748835Z" } }, "outputs": [], "source": [ "x = \"hello world\"" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:35.828283Z", "start_time": "2019-09-18T20:03:35.822124Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "hello world\n" ] } ], "source": [ "print(x)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:35.900715Z", "start_time": "2019-09-18T20:03:35.888553Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The value of the variable x: 'hello world''\n" ] } ], "source": [ "print(\"The value of the variable x: '{}''\".format(x))" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:35.984533Z", "start_time": "2019-09-18T20:03:35.975079Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0\n", "1\n", "2\n", "3\n", "4\n", "5\n", "6\n", "7\n", "8\n", "9\n" ] } ], "source": [ "for i in range(0, 10):\n", " print(i)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:36.054659Z", "start_time": "2019-09-18T20:03:36.045101Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "9\n", "8\n", "7\n", "6\n", "5\n", "4\n", "3\n", "2\n", "1\n", "0\n" ] } ], "source": [ "while i >= 0:\n", " print(i)\n", " i -= 1\n", " " ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:36.274741Z", "start_time": "2019-09-18T20:03:36.257854Z" } }, "outputs": [ { "data": { "text/plain": [ "-1" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "i" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:36.517139Z", "start_time": "2019-09-18T20:03:36.509338Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "hello world\n" ] } ], "source": [ "y = print(\"hello world\")" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2019-09-18T20:03:36.772904Z", "start_time": "2019-09-18T20:03:36.767167Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "None\n" ] } ], "source": [ "print(y)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "@webio": { "lastCommId": null, "lastKernelId": null }, "hide_input": false, "kernelspec": { "display_name": "Python [conda env:helics-environment]", "language": "python", "name": "conda-env-helics-environment-py" }, "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.7.3" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }