Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "metadata": {
- "name": "Learn Python The Hard Way EXE 30"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "raw",
- "metadata": {},
- "source": "http://learnpythonthehardway.org/book/ex30.html"
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "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",
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": "We should take cars\nmaybe we should take the bus\nalright, we'll take the bus\n"
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": "",
- "language": "python",
- "metadata": {},
- "outputs": []
- }
- ],
- "metadata": {}
- }
- ]
- }
Add Comment
Please, Sign In to add comment