{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "40\n", "52\n", "72\n", "0\n", "91\n", "11\n", "1\n", "33\n", "69\n", "8\n", "76\n", "48\n", "42\n", "35\n", "51\n", "6\n", "17\n", "61\n", "50\n", "44\n", "85\n", "94\n", "83\n", "23\n", "2\n", "66\n", "99\n", "43\n", "78\n", "89\n", "93\n", "7\n", "29\n", "87\n", "58\n", "64\n", "67\n", "22\n", "63\n", "5\n", "30\n", "45\n", "95\n", "26\n", "37\n", "62\n", "21\n", "4\n", "41\n", "81\n", "31\n", "15\n", "80\n", "9\n", "74\n", "53\n", "25\n", "47\n", "16\n", "57\n", "3\n", "54\n", "36\n", "71\n", "34\n", "92\n", "38\n", "70\n", "90\n", "75\n", "39\n", "59\n", "68\n", "96\n", "97\n", "32\n", "82\n", "77\n", "55\n", "27\n", "79\n", "24\n", "20\n", "10\n", "12\n", "86\n", "49\n", "56\n", "60\n", "46\n", "28\n", "18\n", "65\n", "14\n", "88\n", "73\n", "98\n", "19\n", "13\n", "84\n" ] } ], "source": [ "# Write a Python program to generate a series of unique random numbers\n", "\n", "import random\n", "\n", "choices = list(range(100))\n", "random.shuffle(choices)\n", "print(choices.pop())\n", "while choices:\n", " print(choices.pop())" ] } ], "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.6.1" } }, "nbformat": 4, "nbformat_minor": 2 }