# Stuck on a problem

**URL:** <https://forum.codewithmosh.com/t/stuck-on-a-problem/1422>\
**Category:** Python\
**Created:** [December 23, 2020, 7:13pm UTC](https://forum.codewithmosh.com/t/stuck-on-a-problem/1422 "2020-12-23T19:13:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottaj](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@scottaj](https://forum.codewithmosh.com/u/scottaj)\
**Post date:** [December 23, 2020, 7:13pm UTC](https://forum.codewithmosh.com/t/stuck-on-a-problem/1422/1 "2020-12-23T19:13:26Z")

</div>

I’m taking the course and trying to write a code and I’m stuck on it. Here is what the results are suppose to be:

# Check if x and b are both True. If they are, print “Both of these are true.”

# Check if y or a is False. If one is, print “One of these is false.”

# Check if either x or y is False. If one is, print out “One is false.”

# Then, only if either x or y is False, check if x is greater than y. If it is, print out “x is greater than y.”

This is the code I wrote and have been working on but can’t figure it out.

x = 8  
y = 0  
a = “Hello!”  
b = “”

if x and b == True:  
print(“Both of these are true”)

elif y or a == False:  
print(“One of these is false”)

elif x or y == False:  
print (“one is false”)

elif x \> y :  
print (“x is greater than y”)

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![NanoTubez](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@NanoTubez](https://forum.codewithmosh.com/u/NanoTubez)\
**Post date:** [December 28, 2020, 4:18am UTC](https://forum.codewithmosh.com/t/stuck-on-a-problem/1422/2 "2020-12-28T04:18:03Z")

</div>

Hello,  
Try using statements like:

if **x == True and b == True** :  
print(“Both of these are true”)

elif **y == False or a == False** :  
print(“One of these is false”)

elif **x == False or y == False** :  
print (“one is false”)

elif x \> y :  
print (“x is greater than y”)
