How do you write a Python function to check if a number entered by the user is in a given range or not (with argument without return type)?
Answers
Answered by
0
Answer:
program to check wheather the number entered by the user is between 0 and 100.
program:
number=int(input("enter the number:"))
if number>=0 and number<=100:
print("yes the number entered is between 0 and 100")
else:
Print("no the number entered is not between 0 and 100")
hope the program is usefull..
plzz mark it as brainlist.
Answered by
0
def in_range(n, min_, max_):
print(min_ <= n <= max_)
if __name__ == "__main__":
n, min_, max_ = [int(x) for x in input("num, min, max: ").split()]
in_range(n, min_, max_)
Similar questions