Ask Question
24 August, 23:10

If (x > 5 AND x < = 10) : print (OK)

+3
Answers (1)
  1. 25 August, 01:18
    0
    If (x > 5 AND x < = 10) : print (OK)

    This is in Python, and there are errors.

    Explanation:

    Variable x is not defined. And OK should be within inverted commas and AND should be in lower case, like as below:

    x=int (input ("Enter X:"))

    if (x>5 and x <=10?) : print ("OK")

    If now x is between 5 and 10 or 10, then the output will be OK. or else it might return some exception value as that case is not definitely in try-catch. Always ensure that you have output defined for each case.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “If (x > 5 AND x < = 10) : print (OK) ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers