Actions

Elements of Python programming

From AstroEd

Revision as of 03:12, 12 February 2013 by WikiSysop (talk | contribs)

Now that you have Python running, and have seen how it works interactively and with executable files, let's explore what we can do with simple useful programming. Some essential topics are

  • Getting data into and out of a program
  • Storing data as numbers and text
  • Accessing data efficiently in lists, tuples, and dictionaries
  • Performing logical and mathematical operations on data
  • Controlling program flow (coming up in the next section)


Input and output

Numbers, text, and data types

Lists, tuples, dictionaries, and statements

Mathematics

Examples

For examples of Python illustrating input, output, data types, lists, and dictionaries, see the examples section.


Assignments

For the assigned homework to use these ideas, see the assignments section.