Skip to content

Autograder Help #121

Answered by mattrussell2
Gvarner84 asked this question in Q&A
Sep 13, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The error you're seeing is from your testing file. In particular, the line

self.calc = satisfied_checker()

What you're trying to do here is to set self.calc to be the satisfied checker function, but this line of code is actually attempting to call the function. Note that in the example code, the Calculator() call of a similar form is instantiating a Calculator class object [which is effectively calling the constructor method of the Calculator class, which doesn't happen to take any arguments].

In your case, if the satisfied_checker() program is a function [which is fine], then you don't need to call it here. Instead, you can simply do

self.calc = satisfied_checker

Then, future calls to s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Gvarner84
Comment options

Answer selected by adam-brucker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants