Should I learn it right now?

A class roster is a list of the people taking a class. If it makes more sense, maybe gradebook is a better term.

Sort of like the objects in the array for this challenge, each student has a first and last name, an id number, and grades.

This challenge is asking you to be able to do something like find everyone on the roster/gradebook who is has a first name of John or got an A on the first test.

So when I started planning my code for this challenge, I started looking at how I would do a physical version of this problem.

Computers need really specific instructions, so how specifically do you check a gradebook for everyone with the first name John?

I will make a new list. Then I will start viewing the list. When I will see the student whose first name is “Jhon” in the list and if he had gotten grade A, I will add his name to the new list which I had created previously and then I will see the class roaster again and will add step by step “John” named student in the newly created list.

So this is the basic process for this challenge as well. The challenge is a bit more complicated because you may need to check for multiple values, like people who have the first name John and got an A on the first test.

So, I think the steps you have described are

  1. make a new empty list
  2. go through the old list one by one
  3. check if an entry matches your requirements
  4. copy matching entries to your new list

1/2 are easier and 3/4 are harder. But this is a pretty solid plan you’ve described and now you can try to turn it into code.

2 Likes

Honestly, I am very grateful for your help. Now, I will bother you when I write the solution to my problem. Thanks, bro!

2 Likes

No, bothering us would be knocking on our doors at 3am. Helping people with their problems on the forum, especially when they are working hard and have a good attitude - that is never a bother, it’s actually one of the ways I relax.

4 Likes

Thanks a lot @kevinSmith.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.