Skip to content
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

Branches - Eve: Ride share #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tofuandeve
Copy link

ride share

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What did your data structure look like at first? Did this structure evolve over time? Why? I had another layer wrapping around the current data structure because I thought there might be a need for it later on when I need to store more data than just drivers. Also for key date:, its value used to be a hash contains 3 other keys (month:, day: and year:) so that I can easily validate input for date to handle invalid input (3000 for year, 13 for month, etc.). But after considering, I can add it later when I need to store more data, or when I need to validate input if I want to read in a file for large data, or get input from user. For now, there's no need for more layers with just small input data
What was your strategy for going through the data structure and gathering information? I don't quite understand this question
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful? highest_earning, highest_average_rating, richest_driver, favorite_driver need to be stored in variables because these are updated on each iteration on of driver
What kinds of iteration did you use? Did you use .map? If so, when? If not, why, or when would be a good opportunity to use it? I used .each to iterate through each of driver, used .map to get total earnings and ratings of each trip a driver made, so that I can call .sum and determine average ratings and total earnings for each driver. I Also used .each to find create a hash of date: total earning a day each driver made
Were some calculations easier than others? Why? Calculating number of total trips each dirver made, average rating and total earning for each driver is easier than other because the calculation only takes in values of 1 category of data for each driver, and this data is independant of other data

@droberts-sea
Copy link

Ride Share

What We're Looking For

Feature Feedback
Answers the comprehension questions yes - You should feel free to reach out to an instructor if part of an assignment (like a comprehension question) doesn't make sense.
Readable code with consistent indentation and reasonable code style yes - good variable names
Outputs the correct number of rides each driver has given yes
Outputs the total amount of money each driver has made yes
Outputs the average rating for each driver yes
Outputs which driver made the most money yes
Outputs which driver has the highest average rating yes

Good work overall! I appreciate the strategy of only looping through the list of drivers once - this provides a nice structure to the code. It is clear to me that the learning goals around working with enumerables and complex data structures were met. Keep up the hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants