PyCon: Introduction to Python

Banner

Py Con

What are we doing?

  1. We are going to introduce PYTHON, and how to install it, and run it.
  2. We will look at how to print out messages to the screen, we'll look at basic MATHS functions, and how to implement VARIABLES in Python.
  3. We will look at how to implement SELECTION in Python.
  4. We will look at how to implement ITERATION in Python.
  5. We will look at implementations of PRIME NUMBERS and FIBONACCI NUMBERS in Python.

Full Set of Notes


Downloading and Installing Python




Powerpoint: Introduction to Python



Running Python Programs


Powerpoint:Print, Maths & Variables
 

Printing to the screen


Simple Mathematics


Variables


Sample Code:
HelloWorldProgram * HelloWorldProgramNewLine * HelloWorldProgramTwoLines * HelloWorldProgramJoinedHelloWorldProgram10Times * HelloWorldProgramNewLine10Times * AddingNumbers * AddingNumbersFancy * SubtractingNumbers * MultiplyingNumbers * RegularDivision * IntegerDivision * DivisionRemainder * DivisionProblem * VariableAssignment * VariablePrint * AddOneVariablePrintTwoVariablePrint * RealVariablePrint * AnotherRealVariablePrint * CharacterVariablePrint * AnotherCharacterVariablePrint * ErrorProgram * StringVariablePrint * PrintMessage * ConvertFromCelsiusToFahrenheit




Powerpoint: Selection


Selection - The IF Statement


Selection - The CASE Statement



Sample Code:
SimpleIfStatement * AnotherSimpleIfStatement * AnotherSimpleIfStatementPrints * AnotherSimpleIfStatementPrintsShorter * IsOddOrEven * BiggerOfThree * BiggerOfThreeElif * MultiChoiceQuestion * GetGrade

 


Powerpoint: Iteration


Iteration - WHILE and FOR Loops



Sample Code:
Print1To5 * Sum1To5 * Factorial * Print1To5For



Powerpoint: Primes and Fibonacci


Algorithm - Prime Number Checker


Algorithm - Fibonacci Numbers


Sample Code:
Prime Checker * Fibonacci

Links
Learn Python the Hard Way
http://learnpythonthehardway.org/book/

Think Python: How to Think Like a Computer Scientist
http://greenteapress.com/thinkpython/html/index.html

Python 3 Tutorial
http://greenteapress.com/thinkpython/html/index.html

"Hello World" in Python and 318 other programming languages
http://rosettacode.org/wiki/Hello_world/Text#Python

Python Programming Examples
http://www.programiz.com/python-programming/examples

Python Wik: Simple Programs
https://wiki.python.org/moin/SimplePrograms


Back

If you have any suggestions, corrections, or comments, please feel free to e-mail me at:
Damian.Gordon(a)dit.ie