This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Data Types


Python recognizes and differentiates between several kinds of data. Lets look at the following and some of the things we can do with them:

  • Strings
  • Numbers
  • Lists
  • Tuples
  • Dictionaries

Learning Resources

Python for Informatics:

 

Extra Credit

You are designing an inventory and point-of-sale system for a local produce market. Aspects of the system include:

  1. farmer name and booth number
  2. market slogan
  3. produce name and price
  4. names of growing seasons ('spring', 'sumer', 'fall', 'winter')
  5. cities where the farmers and participants are located (no state data necessary yet)

Q: How can each aspect be represented in Python data types? Give an example for each.

Task Discussion