Question: Python plz! Problem In English, the indefinite article has two forms: a (used when the first sound of the following word is a consonant) and
Python plz!
Problem In English, the indefinite article has two forms: a (used when the first sound of the following word is a consonant) and an (used, roughly speaking, when the first sound of the following word is a vowel). As an oversimplification of how to make this distinction, let's assume that an should be used when the first letter of the word it precedes is one of a, e, i, o and u, and a should be used otherwise. Write a program that asks the user to enter a phrase, and prints out that phrase preceded by an (with a space) if the phrase starts with a vowel, and a (with a space) for all other inputs (including the empty string). Your program should work like this: 1 Enter a phrase: aardvark an aardvark 2. 3 1 Enter a phrase: banana a banana 2 3 1 Enter a phrase: Australian an Australian 2 3 Note that, based on our simple heuristic, the method will produce some outputs which are more dubious sounding, such as: 1 Enter a phrase: honour a honour 2 3 1 Enter a phrase: unicorn an unicorn 2 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
