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

Add feedback when T is used as TRUE or F as FALSE #301

Open
Laura-Puckett opened this issue Mar 22, 2022 · 0 comments
Open

Add feedback when T is used as TRUE or F as FALSE #301

Laura-Puckett opened this issue Mar 22, 2022 · 0 comments
Labels
grade code Related to automatic code grading

Comments

@Laura-Puckett
Copy link
Contributor

Laura-Puckett commented Mar 22, 2022

For exercises where the learner is expected to use TRUE or FALSE, it would be great if some specific feedback was automatically provided when they use T or F instead.

In the below example, the feedback from the wrong answer (using grade_this() or grade_this_code()) is currently:

In sum(car_parts_qty, na.rm = T), I expected na.rm = TRUE where you wrote na.rm = T.

I think this leaves a little room for confusion where a learner may not realize T and TRUE are actually different and they might assume it was a bug in the grading.

I think it'd be more clear if the automatic feedback mentions something along the lines of:

T should not be used in place of TRUE because T is mutable, and thus not the same as TRUE.

setup

car_parts_qty <- sample(1:50, 10, replace = TRUE)

expected solution

sum(car_parts_qty, na.rm = TRUE)

wrong answer

sum(car_parts_qty, na.rm = T)
@gadenbuie gadenbuie added the grade code Related to automatic code grading label Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grade code Related to automatic code grading
Projects
None yet
Development

No branches or pull requests

2 participants