kellyc1458
kellyc1458 kellyc1458
  • 29-10-2021
  • Computers and Technology
contestada

PLS HELP WITH MY PYTHON HW ILL GIVE YOU BRAINLIEST

PLS HELP WITH MY PYTHON HW ILL GIVE YOU BRAINLIEST class=

Respuesta :

Luicasas Luicasas
  • 30-10-2021

Answer:

class Cat:

   isHungry = None

play = Cat().isHungry = True

eat = Cat().isHungry = False

if play:

   print("I am hungry, I cannot play")

else:

   play = Cat().isHungry = False

if eat:

   print("I am full, I cannot eat")

else:

   eat = Cat().isHungry = True

Explanation:

Just simple if and else statements.

Answer Link

Otras preguntas

Find (a) PQ to the nearest tenth and (b) the coordinates of the midpoint of PQ. P(1,4), Q(3,-2)​
how do political parties affect which bills pass?? hurry im at school
I need help. Please and thank you
A object moving in 3m radius circular path, when it reaches the beginning point again, then the displacement in m equals:
2. what probably destroyed bush's reelection hopes? explain why he lost and his famous quote. why did bush loose ? and what does his famous quote mean
When rolling a pair of die, what is the probability of rolling the sum of 12 OR less than 5? P(sum of 12 OR <5) Please answer this asap
Whats the answer????
A flat, square surface with side length 3.40 cm is in the xy-plane at z = 0.
Work is being done when
Analyze and interpret the illustration below, then make a statement about the distribution of volcanoes, earthquake epicenters, and mountain belts. You may use