SlideShare a Scribd company logo
1 of 2
1.Write an algorithm for resolving a battle among the classic
Pokemon types.
The user should select a type of either fire, water or grass.
The computer should randomly select one of those three types
as well.
To determine if the user or computer wins, or if it is a draw:
fire is stronger than grass, grass is stronger than water, and
water is stronger than fire. Whomever chose the stronger type is
the winner. If both chose the same type it is a draw.
See
here
for an example of what an algorithm should look like. Your
algorithm should be at a similar level of detail.
See
here
(Links to an external site.)
(
http://cgi.soic.indiana.edu/~dpierz/pokemon.html
)for an example of the interactions and determining a winner
(the example has pictures, your algorithm needs only to
consider text based inputs and messages)
If you submit python code instead on an algorithm you will
not receive points for this question.
2.Write a program that ask the user for a string as input. It
should duplicate of all the characters in the string and print it
back out to the user. For example: AbC123 would be printed out
as AAbbCC112233
3.Write a program that takes two lists and displays the items
that occur in both lists. For example: ["a", "b", "c"] ["c", "a",
"d"] would display a and c

More Related Content

More from carlstromcurtis

1. List and discuss the heat sources identified by the NFPA as being.docx
1. List and discuss the heat sources identified by the NFPA as being.docx1. List and discuss the heat sources identified by the NFPA as being.docx
1. List and discuss the heat sources identified by the NFPA as being.docx
carlstromcurtis
 
1.  What are your 5 favorite apps and why.   Be specific and det.docx
1.  What are your 5 favorite apps and why.   Be specific and det.docx1.  What are your 5 favorite apps and why.   Be specific and det.docx
1.  What are your 5 favorite apps and why.   Be specific and det.docx
carlstromcurtis
 
1.  The reading discusses the efforts to revitalize city areas t.docx
1.  The reading discusses the efforts to revitalize city areas t.docx1.  The reading discusses the efforts to revitalize city areas t.docx
1.  The reading discusses the efforts to revitalize city areas t.docx
carlstromcurtis
 
1.  Respond to the Question  Is auscultation of bowel sounds us.docx
1.  Respond to the Question  Is auscultation of bowel sounds us.docx1.  Respond to the Question  Is auscultation of bowel sounds us.docx
1.  Respond to the Question  Is auscultation of bowel sounds us.docx
carlstromcurtis
 

More from carlstromcurtis (20)

1. Explain James Q. Wilsons three types of policing.  2. What.docx
1. Explain James Q. Wilsons three types of policing.  2. What.docx1. Explain James Q. Wilsons three types of policing.  2. What.docx
1. Explain James Q. Wilsons three types of policing.  2. What.docx
 
1. What is the underlying problem in this case from CEO Brian Niccol.docx
1. What is the underlying problem in this case from CEO Brian Niccol.docx1. What is the underlying problem in this case from CEO Brian Niccol.docx
1. What is the underlying problem in this case from CEO Brian Niccol.docx
 
1. List and discuss the heat sources identified by the NFPA as being.docx
1. List and discuss the heat sources identified by the NFPA as being.docx1. List and discuss the heat sources identified by the NFPA as being.docx
1. List and discuss the heat sources identified by the NFPA as being.docx
 
1. What is kinesics2. What is the difference between using time.docx
1. What is kinesics2. What is the difference between using time.docx1. What is kinesics2. What is the difference between using time.docx
1. What is kinesics2. What is the difference between using time.docx
 
1. List two (2) gender related listening differences that have been .docx
1. List two (2) gender related listening differences that have been .docx1. List two (2) gender related listening differences that have been .docx
1. List two (2) gender related listening differences that have been .docx
 
1. In some places, technology has reached the point where a tria.docx
1. In some places, technology has reached the point where a tria.docx1. In some places, technology has reached the point where a tria.docx
1. In some places, technology has reached the point where a tria.docx
 
1. Describe Digital Literacy (how to know what is real on the web). .docx
1. Describe Digital Literacy (how to know what is real on the web). .docx1. Describe Digital Literacy (how to know what is real on the web). .docx
1. Describe Digital Literacy (how to know what is real on the web). .docx
 
1. Define the following terms  poster session, conference proce.docx
1. Define the following terms  poster session, conference proce.docx1. Define the following terms  poster session, conference proce.docx
1. Define the following terms  poster session, conference proce.docx
 
1.  What is disparate-impact discrimination under Title VII an.docx
1.  What is disparate-impact discrimination under Title VII an.docx1.  What is disparate-impact discrimination under Title VII an.docx
1.  What is disparate-impact discrimination under Title VII an.docx
 
1.  What are your 5 favorite apps and why.   Be specific and det.docx
1.  What are your 5 favorite apps and why.   Be specific and det.docx1.  What are your 5 favorite apps and why.   Be specific and det.docx
1.  What are your 5 favorite apps and why.   Be specific and det.docx
 
1.  What does it mean to pierce the corporate veil  Use your .docx
1.  What does it mean to pierce the corporate veil  Use your .docx1.  What does it mean to pierce the corporate veil  Use your .docx
1.  What does it mean to pierce the corporate veil  Use your .docx
 
1.  What are your personal experiences of the educational system  D.docx
1.  What are your personal experiences of the educational system  D.docx1.  What are your personal experiences of the educational system  D.docx
1.  What are your personal experiences of the educational system  D.docx
 
1.  The reading discusses the efforts to revitalize city areas t.docx
1.  The reading discusses the efforts to revitalize city areas t.docx1.  The reading discusses the efforts to revitalize city areas t.docx
1.  The reading discusses the efforts to revitalize city areas t.docx
 
1.  Respond to the Question  Is auscultation of bowel sounds us.docx
1.  Respond to the Question  Is auscultation of bowel sounds us.docx1.  Respond to the Question  Is auscultation of bowel sounds us.docx
1.  Respond to the Question  Is auscultation of bowel sounds us.docx
 
1.  Provide a precise definition for human capital”.  2.  What .docx
1.  Provide a precise definition for human capital”.  2.  What .docx1.  Provide a precise definition for human capital”.  2.  What .docx
1.  Provide a precise definition for human capital”.  2.  What .docx
 
1.  Locate a recent (within six months) article on Net Neutralit.docx
1.  Locate a recent (within six months) article on Net Neutralit.docx1.  Locate a recent (within six months) article on Net Neutralit.docx
1.  Locate a recent (within six months) article on Net Neutralit.docx
 
1.  How Subtle Sex Discrimination Works by Nijole V. Benokra.docx
1.  How Subtle Sex Discrimination Works by Nijole V. Benokra.docx1.  How Subtle Sex Discrimination Works by Nijole V. Benokra.docx
1.  How Subtle Sex Discrimination Works by Nijole V. Benokra.docx
 
1.  Define Culture, Family, and Community and discuss how they a.docx
1.  Define Culture, Family, and Community and discuss how they a.docx1.  Define Culture, Family, and Community and discuss how they a.docx
1.  Define Culture, Family, and Community and discuss how they a.docx
 
1.  Give the definition or meaning of each of the following termsco.docx
1.  Give the definition or meaning of each of the following termsco.docx1.  Give the definition or meaning of each of the following termsco.docx
1.  Give the definition or meaning of each of the following termsco.docx
 
1.  Compare and contrast the definitions of health from a public hea.docx
1.  Compare and contrast the definitions of health from a public hea.docx1.  Compare and contrast the definitions of health from a public hea.docx
1.  Compare and contrast the definitions of health from a public hea.docx
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).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...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 

1.Write an algorithm for resolving a battle among the classic Pokemo.docx

  • 1. 1.Write an algorithm for resolving a battle among the classic Pokemon types. The user should select a type of either fire, water or grass. The computer should randomly select one of those three types as well. To determine if the user or computer wins, or if it is a draw: fire is stronger than grass, grass is stronger than water, and water is stronger than fire. Whomever chose the stronger type is the winner. If both chose the same type it is a draw. See here for an example of what an algorithm should look like. Your algorithm should be at a similar level of detail. See here (Links to an external site.) ( http://cgi.soic.indiana.edu/~dpierz/pokemon.html )for an example of the interactions and determining a winner (the example has pictures, your algorithm needs only to consider text based inputs and messages) If you submit python code instead on an algorithm you will not receive points for this question. 2.Write a program that ask the user for a string as input. It should duplicate of all the characters in the string and print it back out to the user. For example: AbC123 would be printed out as AAbbCC112233
  • 2. 3.Write a program that takes two lists and displays the items that occur in both lists. For example: ["a", "b", "c"] ["c", "a", "d"] would display a and c