SlideShare a Scribd company logo
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. 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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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 .docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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). .docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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 .docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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 .docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 
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.docxcarlstromcurtis
 

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

[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Mohamed Rizk Khodair
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...sanghavirahi2
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Celine George
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTechSoup
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeSaadHumayun7
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff17thcssbs2
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfDr. M. Kumaresan Hort.
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17Celine George
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticspragatimahajan3
 

Recently uploaded (20)

[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 

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