Elements of Python programming: Difference between revisions

From AstroEdWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Now that you have Python running, and have seen how it works interactively  and with executable files let's see what we can do with simple useful programming.
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 ==
== Input and output ==




Line 11: Line 18:




== Lists, tubles, dictionaries, and statements ==
== Lists, tuples, dictionaries, and statements ==





Revision as of 03:12, 12 February 2013

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.