Python

From Wikiversity
Jump to: navigation, search

Python is a high-level, object oriented programming language, created by Guido van Rossum in 1990.

Lets get started![edit]

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name

You will find that these codes don't work because [2] is not true Python. For example the Fibonacci series code must be replaced with

parents, babies = (1, 1)
while babies < 100:
    print 'Hi, %s.' % str(babies)
    parents, babies = (babies, parents + babies)

Please develop this resource by either

  1. finding more codes for the holycross website to run OR
  2. finding a way to download Python so beginners can use codes posted here.

Meanwhile a parallel effort on Wikiversity is underway using Matlab and Octave.

Learning Resources[edit]

  • Why learn Python - reasons to hop on the bandwagon.
  • Setup and Introduction - In this lesson, we'll cover what exactly Python is, and how to get it setup on your computer with the built-in IDLE code editor.
  • Basic Data Types - Learn the five types: strings, tuples, lists, dictionaries, and integers.
  • Operators - Python operators - basically, ways to do things.
  • Basic Functions - In this lesson, we'll cover local variables, value-passing, and defining functions.
  • Flow Control - By using Boolean expressions, flow control, and loops, you'll learn how to code logic into your program.
  • Objects - Learn to write Class definitions, and inherit from other classes.
  • Libraries - Learn how to use the impressive Python Standard Library
  • Quizzes - Quizzes on these lessons
  • Basic Script - Basic Python script example.
  • Learning resources - additional resources for those who want to learn Python, or get better at it.
  • Using USB

Further reading[edit]

Wikibooks-logo.svg Wikibooks has a book on the topic of Non-Programmer's Tutorial for Python .
Wikibooks-logo.svg Wikibooks has a book on the topic of Think Python .
Wikibooks-logo.svg Wikibooks has a book on the topic of Python Programming .
Wikibooks-logo.svg Wikibooks has a book on the topic of PyGTK For GUI Programming .
Wikibooks-logo.svg Wikibooks has a book on the topic of How to Think Like a Computer Scientist: Learning with Python .
Wikibooks-logo.svg Wikibooks has a book on the topic of Python Imaging Library .
Wikibooks-logo.svg Wikibooks has a book on the topic of Subject:Python programming language .

See Also[edit]