Učitavanje zadatka…
Boolean conditions often describe simple real-life rules: there is a problem only when several signs match at once. Write a function parrot_trouble that takes the boolean flag talking and the hour hour in the range 0 to 23. Return True if the parrot is talking before 7 in the morning or after 20 in the evening; otherwise, return False.
True, 6TrueTrue, 7FalseFalse, 6Falsedef parrot_trouble(talking: bool, hour: int) -> bool:
Prijavi se da vidiš povijest predaja
PrijavaPrijavi se da koristiš AI mentora
PrijavaTrue, 6TrueTrue, 7FalseFalse, 6FalseTrue, 21TrueTrue, 20FalseFalse, 23False