# -*- coding: utf-8 -*-
"""
Created on Thu Dec 13 12:28:04 2018

@author: 612383249
"""

#We have a loud talking parrot. The "hour" parameter is the current hour time in the range 0..23. We are in trouble if the parrot is talking and the hour is before 7 or after 20. Return True if we are in trouble.
#
#
#parrot_trouble(True, 6) → True
#parrot_trouble(True, 7) → False
#parrot_trouble(False, 6) → False


def parrot_trouble(talking, hour):
  return bad_time(hour) and talking
  
def bad_time(hour):
  return hour > 20 or hour < 7
