Data Types [May 9, 2011, 7:10 p.m.]
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
- Chapter 6 (Slides, Printable Slides, Lecture Audio)
- Chapter 8 (Slides, Printable Slides, Download Video, Lecture Audio)
- Chapter 9 (Slides, Printable Slides, Download Video, Lecture Audio)
- Chapter 10 (Slides, Printable Slides, Download Video, Lecture Audio)
You are designing an inventory and point-of-sale system for a locaal farmers' market. Aspects of the system include:
- farmer name and booth number
- market slogan
- produce name and price
- names of growing seasons ('spring', 'sumer', 'fall', 'winter')
- cities where the farmers and participants are located (no state data necessary)
Q: How can each aspect be represented in Python data types? Give an example for each.