diff --git a/1/4.ipynb b/1/4.ipynb index 8484a6f..d77a982 100644 --- a/1/4.ipynb +++ b/1/4.ipynb @@ -2,27 +2,51 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hellohellohello\n" + ] + } + ], "source": [ "print(\"hello\" * 3)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "x = 2, y = 3.000000\n" + ] + } + ], "source": [ "print(\"x = %d, y = %f\" % (2, 3.0))" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(2-3j)\n" + ] + } + ], "source": [ "x = 3 + 2j\n", "y = -1j\n", @@ -31,9 +55,26 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "abcdefg\n", + "bc\n", + "bcdefg\n", + "abc\n", + "abcdef\n", + "ef\n", + "efg\n", + "abcdefg\n", + "aceg\n", + "gfedcba\n" + ] + } + ], "source": [ "strs = \"abcdefg\"\n", "print(strs[0:7:1])\n", @@ -50,9 +91,17 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "较小值为: 5.4\n" + ] + } + ], "source": [ "def minimal(x, y):\n", " if x > y:\n",