Hi there, first post.
This has come up twice now and I am not sure how to remedy it.
In both examples, my output is what I expect.
The correct subjects are listed with the corresponding grades that are < and the gpa, and the previous lesson where the ‘final_scores’ are listed that are > the gpa.
Any help appreciated.
tests <- c(76, 89, 78)
homework <- c(85, 90, 88, 79, 88, 95, 74)
projects <- c(77, 93, 87, 90, 77, 82, 80)
class_names <- c(“math”, “chemistry”, “writing”, “art”, “history”, “music”, “physical_education”)
kate_grades <- (tests+homework+projects)/3
names(kate_grades) <- class_names
kate_gpa <- mean(kate_grades)
kate_low_grades <- kate_grades < kate_gpa
names(kate_low_grades) <- class_names
Welcome to the community! I assume that the code you have provided is from this screen:
Your code is almost correct. As the answer checker is looking for
kate_low_grades variable, you have to assign your last line to
kate_low_grades variable like this:
kate_low_grades <- kate_grades[kate_low_grades]
I would recommend you to read this post:
To increase your chance of getting a high quality answer, you want to focus on asking a high quality question. Here are some tips on asking a good question:
The maginifying glass in the upper-right corner is the perfect place to start. If you find things that are realted to your question, but don’t fully answer it, it will be helpful to link to those questions to give as much context as possible to other community members.
Write a Concise Title.
What details need to be inclu…
It will help you to get a faster response from the community.