datacamp/pythonwhat

check_function messaging according to how student called the function

filipsch opened this issue · 0 comments

Suppose the following solution and SCT:

# solution
round(1.1234)

# sct
Ex().check_function('round').check_args('number').has_equal_value()

Depending on how the student called the function, the feedback should be different:

round(2.345)    # --> Check the first argument to round
round(number = 2.345) # --> Check the number argument

Currently, this messaging can only be affected by explicitly referring to the argument by position or by name. So currently, it's the SCT that decides which message is generated in case of an error.