SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
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
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 

Kürzlich hochgeladen (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

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