given the variables x = 7 and y = 14, write a python statement that checks if either x is equal to 7 or y is less than or equal to 10. If the condition is true, write *condition is met*

1 answer

You can use an if statement in Python to check the condition and print the message if it is true. Here’s how you can do that:

x = 7
y = 14

if x == 7 or y <= 10:
    print("condition is met")

In this code, the condition checks if x is equal to 7 or if y is less than or equal to 10. If either condition is true, it will print "condition is met".