import random num = random.randint(1, 20) #num = 15 print(f'Random number: {num}') print('Range: 6 -- 15') if 6 < num < 15: print('in') elif num < 6 or num > 15: print('out') else: print('on the border')