A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

Write a Python function to check whether a number is in a given range
Q:

Write a Python function to check whether a number is in a given range

0

Write a Python function to check whether a number is in a given range. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def test_range(n):
    if n in range(3,9):
        print( " %s is in the range"%str(n))
    else :
        print("The number is outside the given range.")
test_range(5)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now