Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm finished with my program and I need help explainng my program by using #comments. I need help commenting on every section explaning what its

I'm finished with my program and I need help explainng my program by using #comments. I need help commenting on every section explaning what its doing. #Program designed to process gibberish syllables and a word to trabslate, then add the syllables where appropriate. play_again = "Y" while play_again in 'Yy': gibberish = input("Enter the first Gibberish syllable (add * for vowel substitute): ") gibberish2 = input("Enter the second Gibberish syllable (* for vowel substitute): ") word = input("Please enter a word you want to translate: ") vowels = "aeiouAEIOU" vowel_one = False translated = "" prev_char = "" for char in word: if char in vowels and not vowel_one and prev_char not in vowels: vowel_one = True if "*" in gibberish: translated += gibberish.replace('*', char) + char else: translated += gibberish + char elif char in vowels and vowel_one and prev_char not in vowels: if "*" in gibberish2: translated += gibberish2.replace('*', char) + char else: translated += gibberish2 + char else: translated += char prev_char = char print("Your final word: %s" % translated) play_again = input("Play again? (y/n) ") while play_again not in 'YyNn': play_again = input("Please enter y to continue or n to quit: ") print("Thanks for playing!")

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

How would a CFE devise a plan to prevent subsequent employee fraud?

Answered: 1 week ago

Question

How will you measure it?

Answered: 1 week ago

Question

17. As new data becomes available, repeat steps 11 through 16.

Answered: 1 week ago