Conversation
Ride ShareWhat We're Looking For
Good work on this project, Kristy! Overall, your code is clean, logical, and well-organized. You show clear iteration and use of accessing/reading values of nested hashes and arrays. Overall, I'd say that your variable names did not lead to easily readable code; I found some of them intimidating, and I found myself unable to track what variables represented because of their names! Also, if you had more time on this project, I would love to see how you would refactor to practice making more methods. That being said, overall your code style looks good (good indentation, vertical space, etc), and your solutions were good. Good work! |
| driver_earn = "" | ||
|
|
||
|
|
||
| drivers.each do |key, value| |
There was a problem hiding this comment.
Hm, may I suggest renaming these variables to driver and trips, because the key represents the driver, and the value represents an array of trips they've driven?
| drivers.each do |key, value| | ||
| earnings = 0 | ||
| score = 0 | ||
| value.each do |i| |
There was a problem hiding this comment.
Hm, instead of i, could we rename this variable to trip, since each element represents a trip?
ride share
Congratulations! You're submitting your assignment.
Comprehension Questions
.map? If so, when? If not, why, or when would be a good opportunity to use it?