SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
Monster Create a Python program called "monster.py" and define a Monster class. The Monster
class should have the following: - An _init _ method that takes the names and the size of the
monster and creates and sets instance variables with these values. - An attack0 method that takes
the name of the location the monster attacks and prints out a message like: "Godzilla attacks
Tokyo". - A reasonable _str method to print a description of a monster. - An __eq method that
overloads the == operator so that two monsters are equal if and only if they have the same name
and the same size. - An_add_ method that returns a new Monster whose name is the names of
the two original monsters concatenated (for example, GodzillaKong) Write test code that
demonstrates that all your methods work correctly and print out the results.

Mais conteúdo relacionado

Mais de adityaenterprise32

Most exoplanets found are much more massive than Earth and .pdf
Most exoplanets found are much more massive than Earth and .pdfMost exoplanets found are much more massive than Earth and .pdf
Most exoplanets found are much more massive than Earth and .pdfadityaenterprise32
 
Moodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdf
Moodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdfMoodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdf
Moodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdfadityaenterprise32
 
More effort needs to be put into the search and selection of.pdf
More effort needs to be put into the search and selection of.pdfMore effort needs to be put into the search and selection of.pdf
More effort needs to be put into the search and selection of.pdfadityaenterprise32
 
Morgan Barron is the best player on the Cornell University h.pdf
Morgan Barron is the best player on the Cornell University h.pdfMorgan Barron is the best player on the Cornell University h.pdf
Morgan Barron is the best player on the Cornell University h.pdfadityaenterprise32
 
Moosehead based in New Brunswick is the largest Canadiano.pdf
Moosehead based in New Brunswick is the largest Canadiano.pdfMoosehead based in New Brunswick is the largest Canadiano.pdf
Moosehead based in New Brunswick is the largest Canadiano.pdfadityaenterprise32
 
Month Based on this Climagraph from Columbia SC how would.pdf
Month Based on this Climagraph from Columbia SC  how would.pdfMonth Based on this Climagraph from Columbia SC  how would.pdf
Month Based on this Climagraph from Columbia SC how would.pdfadityaenterprise32
 
Monty Corp has 8000 shares of common stock outstanding It.pdf
Monty Corp has 8000 shares of common stock outstanding It.pdfMonty Corp has 8000 shares of common stock outstanding It.pdf
Monty Corp has 8000 shares of common stock outstanding It.pdfadityaenterprise32
 
Monstruos inc Mientras mira la pelcula busque elementos d.pdf
Monstruos inc  Mientras mira la pelcula busque elementos d.pdfMonstruos inc  Mientras mira la pelcula busque elementos d.pdf
Monstruos inc Mientras mira la pelcula busque elementos d.pdfadityaenterprise32
 
Mom were here Sorry were a little late Theyre more t.pdf
Mom were here Sorry were a little late Theyre more t.pdfMom were here Sorry were a little late Theyre more t.pdf
Mom were here Sorry were a little late Theyre more t.pdfadityaenterprise32
 
Money supply endogeneity and financial instability are two p.pdf
Money supply endogeneity and financial instability are two p.pdfMoney supply endogeneity and financial instability are two p.pdf
Money supply endogeneity and financial instability are two p.pdfadityaenterprise32
 
Monosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdf
Monosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdfMonosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdf
Monosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdfadityaenterprise32
 
Monopolistic competition is a market structure very much lik.pdf
Monopolistic competition is a market structure very much lik.pdfMonopolistic competition is a market structure very much lik.pdf
Monopolistic competition is a market structure very much lik.pdfadityaenterprise32
 
Moira has to be at the office from 93 but she gets to choo.pdf
Moira has to be at the office from 93 but she gets to choo.pdfMoira has to be at the office from 93 but she gets to choo.pdf
Moira has to be at the office from 93 but she gets to choo.pdfadityaenterprise32
 
Moira has to be at the office from 93 but she gets to choos.pdf
Moira has to be at the office from 93 but she gets to choos.pdfMoira has to be at the office from 93 but she gets to choos.pdf
Moira has to be at the office from 93 but she gets to choos.pdfadityaenterprise32
 
Module 1 test 101316 10 What are 3 types of nase lsted in .pdf
Module 1 test 101316 10 What are 3 types of nase lsted in .pdfModule 1 test 101316 10 What are 3 types of nase lsted in .pdf
Module 1 test 101316 10 What are 3 types of nase lsted in .pdfadityaenterprise32
 
Modify this code to change the underlying data structure to .pdf
Modify this code to change the underlying data structure to .pdfModify this code to change the underlying data structure to .pdf
Modify this code to change the underlying data structure to .pdfadityaenterprise32
 
Module 5 Case study Reas the foliewing Case study and answer.pdf
Module 5 Case study Reas the foliewing Case study and answer.pdfModule 5 Case study Reas the foliewing Case study and answer.pdf
Module 5 Case study Reas the foliewing Case study and answer.pdfadityaenterprise32
 
Modify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdfModify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdfadityaenterprise32
 
Modify Exercise 1adding an interface called SidedObject that.pdf
Modify Exercise 1adding an interface called SidedObject that.pdfModify Exercise 1adding an interface called SidedObject that.pdf
Modify Exercise 1adding an interface called SidedObject that.pdfadityaenterprise32
 
Modern Depositional Environments Death Valley NP CA What.pdf
Modern Depositional Environments  Death Valley NP CA What.pdfModern Depositional Environments  Death Valley NP CA What.pdf
Modern Depositional Environments Death Valley NP CA What.pdfadityaenterprise32
 

Mais de adityaenterprise32 (20)

Most exoplanets found are much more massive than Earth and .pdf
Most exoplanets found are much more massive than Earth and .pdfMost exoplanets found are much more massive than Earth and .pdf
Most exoplanets found are much more massive than Earth and .pdf
 
Moodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdf
Moodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdfMoodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdf
Moodys Aaa irket tahvili getirisi ile 10 yllk ABD Hazine ta.pdf
 
More effort needs to be put into the search and selection of.pdf
More effort needs to be put into the search and selection of.pdfMore effort needs to be put into the search and selection of.pdf
More effort needs to be put into the search and selection of.pdf
 
Morgan Barron is the best player on the Cornell University h.pdf
Morgan Barron is the best player on the Cornell University h.pdfMorgan Barron is the best player on the Cornell University h.pdf
Morgan Barron is the best player on the Cornell University h.pdf
 
Moosehead based in New Brunswick is the largest Canadiano.pdf
Moosehead based in New Brunswick is the largest Canadiano.pdfMoosehead based in New Brunswick is the largest Canadiano.pdf
Moosehead based in New Brunswick is the largest Canadiano.pdf
 
Month Based on this Climagraph from Columbia SC how would.pdf
Month Based on this Climagraph from Columbia SC  how would.pdfMonth Based on this Climagraph from Columbia SC  how would.pdf
Month Based on this Climagraph from Columbia SC how would.pdf
 
Monty Corp has 8000 shares of common stock outstanding It.pdf
Monty Corp has 8000 shares of common stock outstanding It.pdfMonty Corp has 8000 shares of common stock outstanding It.pdf
Monty Corp has 8000 shares of common stock outstanding It.pdf
 
Monstruos inc Mientras mira la pelcula busque elementos d.pdf
Monstruos inc  Mientras mira la pelcula busque elementos d.pdfMonstruos inc  Mientras mira la pelcula busque elementos d.pdf
Monstruos inc Mientras mira la pelcula busque elementos d.pdf
 
Mom were here Sorry were a little late Theyre more t.pdf
Mom were here Sorry were a little late Theyre more t.pdfMom were here Sorry were a little late Theyre more t.pdf
Mom were here Sorry were a little late Theyre more t.pdf
 
Money supply endogeneity and financial instability are two p.pdf
Money supply endogeneity and financial instability are two p.pdfMoney supply endogeneity and financial instability are two p.pdf
Money supply endogeneity and financial instability are two p.pdf
 
Monosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdf
Monosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdfMonosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdf
Monosodyum glutamat MSG glutamatn bir sodyum tuzu ve yayg.pdf
 
Monopolistic competition is a market structure very much lik.pdf
Monopolistic competition is a market structure very much lik.pdfMonopolistic competition is a market structure very much lik.pdf
Monopolistic competition is a market structure very much lik.pdf
 
Moira has to be at the office from 93 but she gets to choo.pdf
Moira has to be at the office from 93 but she gets to choo.pdfMoira has to be at the office from 93 but she gets to choo.pdf
Moira has to be at the office from 93 but she gets to choo.pdf
 
Moira has to be at the office from 93 but she gets to choos.pdf
Moira has to be at the office from 93 but she gets to choos.pdfMoira has to be at the office from 93 but she gets to choos.pdf
Moira has to be at the office from 93 but she gets to choos.pdf
 
Module 1 test 101316 10 What are 3 types of nase lsted in .pdf
Module 1 test 101316 10 What are 3 types of nase lsted in .pdfModule 1 test 101316 10 What are 3 types of nase lsted in .pdf
Module 1 test 101316 10 What are 3 types of nase lsted in .pdf
 
Modify this code to change the underlying data structure to .pdf
Modify this code to change the underlying data structure to .pdfModify this code to change the underlying data structure to .pdf
Modify this code to change the underlying data structure to .pdf
 
Module 5 Case study Reas the foliewing Case study and answer.pdf
Module 5 Case study Reas the foliewing Case study and answer.pdfModule 5 Case study Reas the foliewing Case study and answer.pdf
Module 5 Case study Reas the foliewing Case study and answer.pdf
 
Modify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdfModify the Simple lexer program given in the link below to .pdf
Modify the Simple lexer program given in the link below to .pdf
 
Modify Exercise 1adding an interface called SidedObject that.pdf
Modify Exercise 1adding an interface called SidedObject that.pdfModify Exercise 1adding an interface called SidedObject that.pdf
Modify Exercise 1adding an interface called SidedObject that.pdf
 
Modern Depositional Environments Death Valley NP CA What.pdf
Modern Depositional Environments  Death Valley NP CA What.pdfModern Depositional Environments  Death Valley NP CA What.pdf
Modern Depositional Environments Death Valley NP CA What.pdf
 

Último

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 

Último (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 

Monster Create a Python program called monsterpy and defi.pdf

  • 1. Monster Create a Python program called "monster.py" and define a Monster class. The Monster class should have the following: - An _init _ method that takes the names and the size of the monster and creates and sets instance variables with these values. - An attack0 method that takes the name of the location the monster attacks and prints out a message like: "Godzilla attacks Tokyo". - A reasonable _str method to print a description of a monster. - An __eq method that overloads the == operator so that two monsters are equal if and only if they have the same name and the same size. - An_add_ method that returns a new Monster whose name is the names of the two original monsters concatenated (for example, GodzillaKong) Write test code that demonstrates that all your methods work correctly and print out the results.