Describing Your Data · Intermediate
Describing Your Data
15 practice questions on Describing Your Data. Every question is written from a specific moment in a real lecture, and after you answer it links to that exact timestamp so you can check it yourself.
What this pack asks
The free questions in this pack. Answer choices and explanations appear as you play.
A Comment class already defines __eq__ and __lt__, and a team now wants <=, > and >= to work so comments can be sorted. … They apply the decorator instead of writing the three remaining methods by hand. What is the trade they are making?
Answer this one →A team is defining a container class whose count field must be coerced to int whatever callers pass in, whose name must be rejected at construction time if it isn't a string, and whose tags field defaults to a fresh empty list per instance. They are choosing between the built-in dataclass decorator and attrs. Which reasoning fits the situation?
Answer this one →
Written from lectures by mCoding. Not affiliated with or endorsed by any university, channel, creator or certification program.