-
Notifications
You must be signed in to change notification settings - Fork 35
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
Change the reactor temperature to something smiliar but executable #179
Comments
Good suggestion to turn it to something executable. Thanks! Similar idea could be to test the following function without waiting for 4 years: import datetime
def we_are_in_a_leap_year():
year = datetime.datetime.now().year
try:
# function throws ValueError if the date (Feb 29) does not exist for
# this year
datetime.datetime(year, 2, 29)
return True
except ValueError:
return False |
Yes in the end I do not care, but most students actually wrote tests for this exercise, which was really nice to see how engaged they were. The reactor exercise confused many and we spend a lot of time explaining that this code does not work. So I think the executable code is much better, which exact one you take I do not care. :) Yours is maybe already more relatable and less construed. |
I agree the reactor one is weird and also full support to replace it. |
So I make a PR and we merge it or is there any reason that would hold this up? |
Yes please go ahead with the PR. Thanks a lot for this suggestion. When I taught it, I always just skimmed over it so you have more experience here what works well and what doesn't. |
Am I right in thinking some languages are still missing? I will not merge yet, but we should get back to this. |
The problem with other languages is, that it it requires a lot of boilerplate to make the test work. Or even Macros, dependency injection or other stuff. |
For python we replaced the test by this:
with the solution
Advantage is people can actually play around with it. The function is quite nonsensical, but we had a better experience with this.
The text was updated successfully, but these errors were encountered: