6. Imagine a class named People with attributes infants (a list of infants) and m_boy and m_girls with the class static variable: m_boys + m_girls = len(infants). Consider how a method called...


Python


6. Imagine a class named People with attributes infants (a list of infants) and m_boy and m_girls<br>with the class static variable: m_boys + m_girls = len(infants).<br>Consider how a method called add_infant(self, infant, is_boy) could be prepared. What is correct<br>about this class static variable? O<br>a. If the variable is ever not correct, python will raise an error.<br>b. It must be correct after every line of add_infant is executed.<br>c. It must be correct before and after add infant is executed.<br>both a and b<br>both a and c<br>

Extracted text: 6. Imagine a class named People with attributes infants (a list of infants) and m_boy and m_girls with the class static variable: m_boys + m_girls = len(infants). Consider how a method called add_infant(self, infant, is_boy) could be prepared. What is correct about this class static variable? O a. If the variable is ever not correct, python will raise an error. b. It must be correct after every line of add_infant is executed. c. It must be correct before and after add infant is executed. both a and b both a and c

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here