isdsucph / isds2022

Introduction to Social Data Science 2022 - a summer school course https://isdsucph.github.io/isds2022/
MIT License
21 stars 23 forks source link

Assert statements #17

Open Laurits00 opened 2 years ago

Laurits00 commented 2 years ago

How rigid are the assert statements - in particular, should we avoid printing the results in the exercises where we aren't asked to? And should we always use the approaches suggested in the hints, in order for the statements to check? For instance, do they check if I solve exercise 0.4.2 without the .isin method?

isdsucph commented 2 years ago

Hi @Laurits00

The assert statements are not that rigid. You are free to print the results in the exercise if you like. You do not have to follow the hints in order for the statements to check. The statements only check whether the specified variable has the correct value assigned to it or the given function that you should construct takes the correct input and gives the correct output.

In exercise 4.2. the grading is based on the subset of the dataframe stored in the variable df_select. Therefore, the assert statements do not check whether you have used the isin method or some other way to subset the dataframe correctly, only whether df_select has the correct subset of the original dataframe assigned to it. You are free to do this however you like.