Computer Science, asked by gsivaanandini, 8 months ago

Pooja just got a new cellphone. She carries it everywhere, even to her morning college classes. She normally answers calls, except in the morning. In the morning she answers only if her Mom calls. However she never answers any calls when she is sleeping. Write a method Met to that takes in 3 boolean parameters: the first boolean is true if it is morning and false if it is not morning the second boolean is true if her mom is calling and false if her mom is not calling the third boolean is true if she is sleeping and false if she is not sleeping You have to print True if Pooja will answer the call and False if she will not answer it Example Input: true false false Output: False Example Input: true true false Output: True Example Input: false true true Output: False can you plss help me in this program in python

Answers

Answered by mohdreha
0

Answer:

i didn't get this question

sorry for that

Answered by jai696
2

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

def will_answer(is_morning, mom_calling, is_sleeping):

if is_sleeping:

return 0

if is_morning and not mom_calling:

return 0

return 1

for l in [[True, False, False], [True, True, False], [False, True, True]]:

print(bool(will_answer(*l)))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions