Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "metadata": {
- "name": "Learn Python3 The Hard Way exe33"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "i = 0\n\nnumbers = []\n\nwhile i < 6:\n print (\"at the top is {}\".format(i))\n numbers.append(i)\n \n i=i +1\n print (\"numbers now: \", numbers)\n print (\"at the bottom i is {} \".format(i))\n \nprint (\"The numbers: \")\n\nfor num in numbers:\n print (num)\n\n\n\n\n\n\n\n\n",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "at the top is 0\nnumbers now: [0]\nat the bottom i is 1 \nat the top is 1\nnumbers now: [0, 1]\nat the bottom i is 2 \nat the top is 2\nnumbers now: [0, 1, 2]\nat the bottom i is 3 \nat the top is 3\nnumbers now: [0, 1, 2, 3]\nat the bottom i is 4 \nat the top is 4\nnumbers now: [0, 1, 2, 3, 4]\nat the bottom i is 5 \nat the top is 5\nnumbers now: [0, 1, 2, 3, 4, 5]\nat the bottom i is 6 \nThe numbers: \n0\n1\n2\n3\n4\n5\n"
- }
- ],
- "prompt_number": 1
- }
- ],
- "metadata": {}
- }
- ]
- }
Add Comment
Please, Sign In to add comment