Code RoomValidation logic contradicts itself
MediumPrep Room Coding #2284

Validation logic contradicts itself

Code reviewCode quality & reviewMid–Senior~18 min

Review this helper.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix, specific and kind.

0:00 of about 18 min
Mark a line and say what kind of problem it is.0 findings
1def is_valid(user):
2 valid = True
3 if user.email is None:
4 valid = False
5 if user.age > 18:
6 valid = True
7 return valid
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.