Ask Question

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

+2
Answers (1)
  1. 30 October, 02:45
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers