Ask Question
17 June, 11:02

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

+5
Answers (1)
  1. 17 June, 11:13
    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?
Find an answer to your question ✅ “If (x > 5 AND x < = 10) : print (OK) ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers