Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Code Please: Talk like a Pirate! In this activity you are to create an English to Pirate Translator. Users should input a phrase and

Python Code Please:
Talk like a Pirate! In this activity you are to create an English to Pirate Translator. Users should input a phrase and your program should translate it into pirate speak. A few rules:
1. Certain words need to be converted:
hello becomes ahoy
hi becomes yo-ho-ho
my becomes me
friend becomes bucko
sir becomes matey
where becomes whar
is becomes be
the becomes th'
there becomes thar
you becomes ye
anything which ends in -ing becomes -in'
2. You need to obey capitalization and punctuation: if the word is capitalized, then its translation should also be capitalized. If the sentence ends in a period, then the translation should end in a period. To keep punctuation simple, you can stick to coding for commas and periods, and ignore all the rest.
3. Pirates like the word "arr". For fun, randomly insert it into your translation.
4. Remember to use all the tools in your arsenal, especially mainline logic, functions, loops, and error handling.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago