Skip to content

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

Open

Description

@Laura-Puckett

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)

Activity

  1. added
    grade code
    on Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    grade code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions