004 - How Were Your Grades?

  • Discussion of article 004 - How Were Your Grades?:

    Quote
    Take your programming skills to the next level by completing code challenges. Download the unity package attached and work your way through the challenge. If you get stuck, you can check out the corresponding forum created with this challenge. Good Luck!
  • Alright, I am not sure if this qualifies as completed.

    I was going to do the average grade and score to show there as well, I just have no idea how to proceed.

    I will add my script to anyone interested.



  • Having some issues getting the Average Grade and Text to work. At this point it only works if I get four different grades, (A, C, B and F) because then they'll "GetGrade()" in different places of the if statement.

    I've been stuck on how to get the score if I f.example get two "A's" in the grades.


    I'd love some input, hate leaving a challenge unfinished. :p

  • So right now, your code is checking just 1 score it looks like. You have 4 scores.

    A better way to solve this would be to have GetGrades() return an int value and have each score value call that method.

    score1 = GetGrade(int randomScore);

    It would then run your logic, return that random code, but also allow you to fill in the visual logic.