SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
1. During runtime, il a Pvtion module's _ name _ attribute is set to ' _ main _ tast meinc (2pts)+ a.
the module is a class b. the module is NoT running as the main module of the Python prostam. c.
the module is running as the main module of the Pyphon program t. all the above 2. Review the
Python class definition below. How many arguments wiil be requirad when creating objects of the
Person class? (2pt+) closis Persont dinf -init__(self, first_none, lastinone, gender) self +ifirst_nome
=first_nane self._last_name = last, nore self,-gender = gender adefine self._ftrst,none getter
epproperty def first_nane (setf): return self ifirst_nane abefine self _last name getter Eproperty def
last_name(self): petuen self;_last_none Hefine self igender getter diproperty def gender(self):
retirn self,-gender a. 2 b. 4 c. 3 d. 03. Review the Python class definitions. Which of the two
classes uses inineritarice? 2 pes closs Horse: def -init_(self, name, color, binth_year): Eqroperty
def name(self): return self. . name. Ename setter. def name(self, other_name): self._.name =
other_name a. Horse and RaceHorse b. RaceHorse c. Horse d. All the above4. Meview the
Pvthon class definitian below. How many class 7 (2pts) Wiaf Winit_(oelf, nome, cotar, birthiyear):
belf - neme - nome paroperty (of nome (setf): netula self._nane. epropertyl def color(self): return
setf._-olar eproperty def birth-year(self): return self, wirth_year Enone, setter def none(self, other-
nare): self._name = other_name ecolor, setter def color(self, other_color): self.__color =
other_color ebirth_year.setter def birth_year(self, other_birth_year): self._birth_year = birth_year
a. 0 b. 1 c. 3 d. None of the aboveeproperty Eproperty anf birth yeariself 3 : enane, setten Wef
nome(seter nom, othermome): self is.name = other.nase ecolor,setten def color(self, other color):
self solcolor = other_color ebirch-year setter ebtrth_year setter selfi_birth_year mbirth_year a. 0 b.
1 c. 3 d. None of the above 6. Review the code below. The class uses inheritance (True or False)
(2pts) Ifae sorting_cldss_abjects inport Person tepert unittest closs MyunitTestClass(unittest,
TestCase): p1. = Person("Arnold", "Schnarzenegger", "M") def test 1( self): p2 = Person("Tina",
"Fey", FF) self, assertequal (p2<p2, True) self, assertequal (p2<p1, false) if _name.. w main_?
unitest, moin( ) a. True b. Fatse

Mais conteúdo relacionado

Semelhante a 1 During runtime il a Pvtion modules _ name _ attribute i.pdf

Python magicmethods
Python magicmethodsPython magicmethods
Python magicmethodsdreampuf
 
Python introduction 2
Python introduction 2Python introduction 2
Python introduction 2Ahmad Hussein
 
Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5Anton Kasyanov
 
جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲Mohammad Reza Kamalifard
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Threeamiable_indian
 
Code with Style - PyOhio
Code with Style - PyOhioCode with Style - PyOhio
Code with Style - PyOhioClayton Parker
 
How to write test in Django
How to write test in DjangoHow to write test in Django
How to write test in DjangoShunsuke Hida
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayUtkarsh Sengar
 
Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)Andre Foeken
 

Semelhante a 1 During runtime il a Pvtion modules _ name _ attribute i.pdf (17)

python note.pdf
python note.pdfpython note.pdf
python note.pdf
 
Python classes objects
Python classes objectsPython classes objects
Python classes objects
 
Python magicmethods
Python magicmethodsPython magicmethods
Python magicmethods
 
Python oop third class
Python oop   third classPython oop   third class
Python oop third class
 
Python introduction 2
Python introduction 2Python introduction 2
Python introduction 2
 
Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5Anton Kasyanov, Introduction to Python, Lecture5
Anton Kasyanov, Introduction to Python, Lecture5
 
جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه هفتم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
 
Introduction to Python - Part Three
Introduction to Python - Part ThreeIntroduction to Python - Part Three
Introduction to Python - Part Three
 
Code with Style - PyOhio
Code with Style - PyOhioCode with Style - PyOhio
Code with Style - PyOhio
 
Python 101 1
Python 101   1Python 101   1
Python 101 1
 
How to write test in Django
How to write test in DjangoHow to write test in Django
How to write test in Django
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard Way
 
Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)
 
Code with style
Code with styleCode with style
Code with style
 
Lecture33
Lecture33Lecture33
Lecture33
 
Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010
 
Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010
 

Mais de adeshpawar234

1 Describe the event of trading something for something els.pdf
1 Describe the event of trading something for something els.pdf1 Describe the event of trading something for something els.pdf
1 Describe the event of trading something for something els.pdfadeshpawar234
 
1 Describe and interpret the data in Figure 21 Describe .pdf
1 Describe and interpret the data in Figure 21 Describe .pdf1 Describe and interpret the data in Figure 21 Describe .pdf
1 Describe and interpret the data in Figure 21 Describe .pdfadeshpawar234
 
1 Describe how applying big data technology to social media.pdf
1 Describe how applying big data technology to social media.pdf1 Describe how applying big data technology to social media.pdf
1 Describe how applying big data technology to social media.pdfadeshpawar234
 
1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdf1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdfadeshpawar234
 
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdfadeshpawar234
 
1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdf1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdfadeshpawar234
 
1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdf1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdfadeshpawar234
 
1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdf1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdfadeshpawar234
 
1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdf1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdfadeshpawar234
 
1 Describe an E test plastic strip How are they placed on.pdf
1 Describe an E test plastic strip  How are they placed on.pdf1 Describe an E test plastic strip  How are they placed on.pdf
1 Describe an E test plastic strip How are they placed on.pdfadeshpawar234
 
1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdf1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdfadeshpawar234
 
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdfadeshpawar234
 
1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdf1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdfadeshpawar234
 
1 Fill out the deviation blanks dev 2 Calculate the Va.pdf
1 Fill out the deviation blanks dev  2 Calculate the Va.pdf1 Fill out the deviation blanks dev  2 Calculate the Va.pdf
1 Fill out the deviation blanks dev 2 Calculate the Va.pdfadeshpawar234
 
1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdf1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdfadeshpawar234
 
1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdf1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdfadeshpawar234
 
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdfadeshpawar234
 
1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdf1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdfadeshpawar234
 
1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdf1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdfadeshpawar234
 
1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdf1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdfadeshpawar234
 

Mais de adeshpawar234 (20)

1 Describe the event of trading something for something els.pdf
1 Describe the event of trading something for something els.pdf1 Describe the event of trading something for something els.pdf
1 Describe the event of trading something for something els.pdf
 
1 Describe and interpret the data in Figure 21 Describe .pdf
1 Describe and interpret the data in Figure 21 Describe .pdf1 Describe and interpret the data in Figure 21 Describe .pdf
1 Describe and interpret the data in Figure 21 Describe .pdf
 
1 Describe how applying big data technology to social media.pdf
1 Describe how applying big data technology to social media.pdf1 Describe how applying big data technology to social media.pdf
1 Describe how applying big data technology to social media.pdf
 
1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdf1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdf
 
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
 
1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdf1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdf
 
1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdf1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdf
 
1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdf1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdf
 
1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdf1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdf
 
1 Describe an E test plastic strip How are they placed on.pdf
1 Describe an E test plastic strip  How are they placed on.pdf1 Describe an E test plastic strip  How are they placed on.pdf
1 Describe an E test plastic strip How are they placed on.pdf
 
1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdf1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdf
 
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
 
1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdf1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdf
 
1 Fill out the deviation blanks dev 2 Calculate the Va.pdf
1 Fill out the deviation blanks dev  2 Calculate the Va.pdf1 Fill out the deviation blanks dev  2 Calculate the Va.pdf
1 Fill out the deviation blanks dev 2 Calculate the Va.pdf
 
1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdf1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdf
 
1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdf1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdf
 
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
 
1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdf1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdf
 
1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdf1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdf
 
1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdf1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdf
 

Último

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 

Último (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

1 During runtime il a Pvtion modules _ name _ attribute i.pdf

  • 1. 1. During runtime, il a Pvtion module's _ name _ attribute is set to ' _ main _ tast meinc (2pts)+ a. the module is a class b. the module is NoT running as the main module of the Python prostam. c. the module is running as the main module of the Pyphon program t. all the above 2. Review the Python class definition below. How many arguments wiil be requirad when creating objects of the Person class? (2pt+) closis Persont dinf -init__(self, first_none, lastinone, gender) self +ifirst_nome =first_nane self._last_name = last, nore self,-gender = gender adefine self._ftrst,none getter epproperty def first_nane (setf): return self ifirst_nane abefine self _last name getter Eproperty def last_name(self): petuen self;_last_none Hefine self igender getter diproperty def gender(self): retirn self,-gender a. 2 b. 4 c. 3 d. 03. Review the Python class definitions. Which of the two classes uses inineritarice? 2 pes closs Horse: def -init_(self, name, color, binth_year): Eqroperty def name(self): return self. . name. Ename setter. def name(self, other_name): self._.name = other_name a. Horse and RaceHorse b. RaceHorse c. Horse d. All the above4. Meview the Pvthon class definitian below. How many class 7 (2pts) Wiaf Winit_(oelf, nome, cotar, birthiyear): belf - neme - nome paroperty (of nome (setf): netula self._nane. epropertyl def color(self): return setf._-olar eproperty def birth-year(self): return self, wirth_year Enone, setter def none(self, other- nare): self._name = other_name ecolor, setter def color(self, other_color): self.__color = other_color ebirth_year.setter def birth_year(self, other_birth_year): self._birth_year = birth_year a. 0 b. 1 c. 3 d. None of the aboveeproperty Eproperty anf birth yeariself 3 : enane, setten Wef nome(seter nom, othermome): self is.name = other.nase ecolor,setten def color(self, other color): self solcolor = other_color ebirch-year setter ebtrth_year setter selfi_birth_year mbirth_year a. 0 b. 1 c. 3 d. None of the above 6. Review the code below. The class uses inheritance (True or False) (2pts) Ifae sorting_cldss_abjects inport Person tepert unittest closs MyunitTestClass(unittest, TestCase): p1. = Person("Arnold", "Schnarzenegger", "M") def test 1( self): p2 = Person("Tina", "Fey", FF) self, assertequal (p2<p2, True) self, assertequal (p2<p1, false) if _name.. w main_? unitest, moin( ) a. True b. Fatse