I'm trying to get IsInRange() to give me a True or False statement, but the module does not see the main file input. I keep getting
'NameError: name 'firstnum' is not defined'
MODULE1:
def IsInRange():
if firstnum in range(lr,hr) and secondnum in range(lr,hr):
return True
else:
return False
MAIN:
import MODULE1
lr = int(input("Enter your lower range: "))
hr = int(input("Enter your higher range: "))
firstnum = int(input("Enter your first number: "))
secondnum = int(input("Enter your second number: "))
MODULE1.IsInRange()
IsInRange()thats why they are undefinedlower_case_with_underscoresstyle. Is your function just for the sake of example? It could be simplified slightly.