# Understanding boolean conditional - Module 2 quiz 2 question

**URL:** <https://community.deeplearning.ai/t/understanding-boolean-conditional-module-2-quiz-2-question/896051>\
**Category:** AI Python for Beginners\
**Tags:** week-module-2, dl-ai-learning-platform\
**Created:** [October 30, 2026, 6:02am UTC](https://community.deeplearning.ai/t/understanding-boolean-conditional-module-2-quiz-2-question/896051 "2026-10-30T06:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug4](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@doug4](https://community.deeplearning.ai/u/doug4)\
**Post date:** [October 30, 2026, 6:02am UTC](https://community.deeplearning.ai/t/understanding-boolean-conditional-module-2-quiz-2-question/896051/1 "2026-10-30T06:02:48Z")

</div>

I cannot make out why the answer to this is not access denied. The password is defined as 1234, not “admin1234”

Is this an error in the quiz? or am i not understanding the way the boolean logic is working.

 ![image](https://global.discourse-cdn.com/dlai/original/3X/6/b/6b267826e12acd7d7e90d3db411f18be71da0d1c.png)

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [October 30, 2026, 6:21am UTC](https://community.deeplearning.ai/t/understanding-boolean-conditional-module-2-quiz-2-question/896051/2 "2026-10-30T06:21:35Z")

</div>

Since the username is “admin”, the If statement succeeds (because of the OR operator), so access is granted.

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [October 30, 2026, 9:20am UTC](https://community.deeplearning.ai/t/understanding-boolean-conditional-module-2-quiz-2-question/896051/3 "2026-10-30T09:20:07Z")

</div>

I believe both conditions should be true simultaneously, that’s what the exercise is asking.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [October 30, 2026, 3:53pm UTC](https://community.deeplearning.ai/t/understanding-boolean-conditional-module-2-quiz-2-question/896051/4 "2026-10-30T15:53:56Z")

</div>

I think the question is a simple one of “what does this python code do?” Not a practical question about login security.

Perhaps it’s just a bad example to use in a quiz. I agree with that.
