-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create sara_nilsen.rb #32
base: master
Are you sure you want to change the base?
Conversation
Ride ShareMajor Learning Goals/Code Review
Functional Requirements
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
@@ -0,0 +1,131 @@ | |||
uber_data = | |||
{ | |||
"DR0001": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a good reason to use a string here rather than a symbol?
puts "Driver amount of rides" | ||
uber_data.each do |driver, info| | ||
puts "Driver #{driver}: #{info.length} rides." | ||
end | ||
puts "" | ||
most_money = 0 | ||
driver_most_money = "" | ||
puts "Total amount earned by each driver" | ||
uber_data.each do |driver, info| | ||
total_money = get_total_money(info) | ||
puts "Driver #{driver}: $#{total_money}" | ||
if total_money > most_money | ||
most_money = total_money | ||
driver_most_money = driver | ||
end | ||
end | ||
puts "" | ||
most_average = 0 | ||
driver_most_average = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if you broke different sections into chunks using new lines, that way I can read relevant code groupings as a chunk.
Assignment Submission: Ride Share
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection
.map
? If so, when? If not, why, or when would be a good opportunity to use it?