tiy-houston-q1-rails / week-1-lab

Week 1 Lab: Data
0 stars 1 forks source link

Alex Noons Week 1 Lab #6

Open Hurtybob opened 9 years ago

Hurtybob commented 9 years ago

https://gist.github.com/Hurtybob/049c06c15a59cacb2c4d

jwo commented 9 years ago

This works well... but there's 1 problem. You copied the text into the source code:

ship1 = "Earth,Hamburgers,150,30000"
ship2 = "Moon,Tacos,33,44500"
ship3 = "Earth,Movies,34,5000"
ship4 = "Mars,BBQ Sauce,999,15000"
ship5 = "Uranus,Whiskey,1000,345600"
ship6 = "Jupiter,Books,10,3451"
ship7 = "Pluto,Beer,100,2344"
ship8 = "Uranus,Pizza,66,10000"
ship9 = "Saturn,Pizza,26,1000"
ship10 = "Mercury,Pizza,36,80000" 

So, that makes this not very re-usable. Ideally, you'd reuse the code with a new file every year. So, it should open the file and read in the data.