Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Duncan Keith
- # 14426143
- # 80 character or less description of what the program does
- from math import *
- # Functions
- def populate_data():
- return []
- def product(data):
- prod = 1
- for i in data:
- prod = prod * i
- return prod
- # Data Representation
- data = []
- # Program that executes
- data = populate_data()
- print(product([1,2,3,4,5]))
- # What do I do with data in a list # these things are functions
- # 1. (list) -> value
- # 2. (list) -> (list)
- # 3. (list) -> void # printing results or graphing results
- # 1. Look at the problem and come up with a data representation for it
- # 2. Come up with a big picture plan of how to solve the problem
- # 3. Create function stubs (placeholder function)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement