# Conditional statement

**URL:** <https://forum.codewithmosh.com/t/conditional-statement/3209>\
**Category:** Python\
**Created:** [March 7, 2021, 12:23pm UTC](https://forum.codewithmosh.com/t/conditional-statement/3209 "2021-03-07T12:23:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![afaq007](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@afaq007](https://forum.codewithmosh.com/u/afaq007)\
**Post date:** [March 7, 2021, 12:23pm UTC](https://forum.codewithmosh.com/t/conditional-statement/3209/1 "2021-03-07T12:23:13Z")

</div>

![Second mistake](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/2/281b31222b02fe9a60b6c4ce562b53176c7f81a2.png)  
in this topic, U will see in the pic that I use a conditional statement and when i run the programme on compiler than it shows only done and the upper two print functions created would not be shown could u please show me about this mistake…

---

<div class="post-metadata">

**Author:** ![mikey6879](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mikey6879](https://forum.codewithmosh.com/u/mikey6879)\
**Post date:** [March 7, 2021, 3:57pm UTC](https://forum.codewithmosh.com/t/conditional-statement/3209/2 "2021-03-07T15:57:13Z")

</div>

I think the problem may be that you want your if statement to be weight \< = 82. Your current if statement will only execute when weight is a number less than 82 rather than less than or equal to.

---

<div class="post-metadata">

**Author:** ![afaq007](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@afaq007](https://forum.codewithmosh.com/u/afaq007)\
**Post date:** [March 10, 2021, 5:47pm UTC](https://forum.codewithmosh.com/t/conditional-statement/3209/3 "2021-03-10T17:47:40Z")

</div>

Thanks a lot for giving Ur precious time I’m really really thankful for U…

---

<div class="post-metadata">

**Author:** ![Sunath](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@Sunath](https://forum.codewithmosh.com/u/Sunath)\
**Post date:** [May 18, 2021, 7:44am UTC](https://forum.codewithmosh.com/t/conditional-statement/3209/4 "2021-05-18T07:44:32Z")

</div>

Because your weight variable is equal to 82

U can do this "if weight \<= 82:  
print(“what you need”)  
"

---

<div class="post-metadata">

**Author:** ![Codergirl](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Codergirl](https://forum.codewithmosh.com/u/Codergirl)\
**Post date:** [December 31, 2021, 1:24pm UTC](https://forum.codewithmosh.com/t/conditional-statement/3209/5 "2021-12-31T13:24:28Z")

</div>

This is because the weight variable is qual to 82 and not less than 82.  
use if weight\<=82:  
print(’’)  
It will solve your problem
