<filename>horafunc.py
def hora(h):
    if 0 < h < 12:
        print('Bom dia!')
    elif 12 <= h < 18:
        print('Boa tarde!')
    elif 18 <= h < 24:
        print('Boa noite!')
<filename>horafunc.py
def hora(h):
    if 0 < h < 12:
        print('Bom dia!')
    elif 12 <= h < 18:
        print('Boa tarde!')
    elif 18 <= h < 24:
        print('Boa noite!')