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- Amal #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Branches- Amal #29

wants to merge 1 commit into from

Conversation

ashassan
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 wasn't going to organize it by the driver before. However, when I saw part 4, I realized all the questions were about the driver and changed it.
What was your strategy for going through the data structure and gathering information? I drew out my data structure on paper and marked what the iteration variables corresponded to on there. I used puts to verify what the values were.
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful? I needed to store my data structure in a variable so that I could access it later and do calculations.
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 and some enumerables(.sum, .max_by, etc.). I didn't use .map because it returns an array and I didn't want it in that form.
Were some calculations easier than others? Why? Calculating the driver with the highest rating and the driver that made the most money was harder than the other calculations. At first, I had variables that stored the current maximum value and the driver with the current maximum. However, when I started using enumerables it became easier. I just used the max_by method

@jmaddox19
Copy link

Ride Share

What We're Looking For

Feature Feedback
Answers the comprehension questions X
Readable code with consistent indentation and reasonable code style X
Outputs the correct number of rides each driver has given X
Outputs the total amount of money each driver has made X
Outputs the average rating for each driver X
Outputs which driver made the most money X
Outputs which driver has the highest average rating X

Great job! Your code is really succinct. Great use of the different built-in methods (max_by, sum, etc.)!

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