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