{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"Hello world\" in Python\n", "===\n", "When programmers are learning a new language, we tend to write a one-line program that prints some version of the message \"Hello world!\" this is a simple program that shows whether your computer is properly set up to run Python programs." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello Python world!\n" ] } ], "source": [ "print('Hello Python world!')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note: If you are using Python 2.7, this would be:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello Python world!\n" ] } ], "source": [ "print \"Hello Python world!\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If it works, congratulations! You just ran your first Python program." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- - -\n", "[Home](http://nbviewer.ipython.org/urls/raw.github.com/ehmatthes/intro_programming/master/notebooks/index.ipynb) | \n", "[Next: Variables, Strings, and Numbers](http://nbviewer.ipython.org/urls/raw.github.com/ehmatthes/intro_programming/master/notebooks/var_string_num.ipynb)" ] } ], "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.4.0" } }, "nbformat": 4, "nbformat_minor": 0 }