pleabargain

learnpythonthehardway.org/book/ex30 ipynb

Jun 2nd, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.32 KB | None | 0 0
  1. {
  2.  "metadata": {
  3.   "name": "Learn Python The Hard Way EXE 30"
  4.  },
  5.  "nbformat": 3,
  6.  "nbformat_minor": 0,
  7.  "worksheets": [
  8.   {
  9.    "cells": [
  10.     {
  11.      "cell_type": "raw",
  12.      "metadata": {},
  13.      "source": "http://learnpythonthehardway.org/book/ex30.html"
  14.     },
  15.     {
  16.      "cell_type": "code",
  17.      "collapsed": false,
  18.      "input": "people = 30\ncars = 40\nbuses = 25\n\nif cars>people:\n    print (\"We should take cars\")\n    \nelif cars < people:\n    print (\"We should !take cars\")\n\nelse:\n    print (\"!decide\")\n    \nif buses > cars:\n    print (\"too many busess\")\n    \nelif buses < cars:\n    print (\"maybe we should take the bus\")\n    \nelse:\n    print (\"still !decide\")    \n    \nif people > buses:\n    print (\"alright, we'll take the bus\")\n    \nelse:\n    print (\"we'll stay home\")\n    \n\n\n\n\n\n\n\n\n\n\n",
  19.      "language": "python",
  20.      "metadata": {},
  21.      "outputs": [
  22.       {
  23.        "output_type": "stream",
  24.        "stream": "stdout",
  25.        "text": "We should take cars\nmaybe we should take the bus\nalright, we'll take the bus\n"
  26.       }
  27.      ],
  28.      "prompt_number": 2
  29.     },
  30.     {
  31.      "cell_type": "code",
  32.      "collapsed": false,
  33.      "input": "",
  34.      "language": "python",
  35.      "metadata": {},
  36.      "outputs": []
  37.     }
  38.    ],
  39.    "metadata": {}
  40.   }
  41.  ]
  42. }
Add Comment
Please, Sign In to add comment