Americans spell differently from Canadians. Americans write neighbor and color while Canadians write neighbour and colour. Write a program to help Americans translate to Canadian. Your program should...

PythonAmericans spell differently from Canadians. Americans write neighbor and color while Canadians<br>write neighbour and colour.<br>Write a program to help Americans translate to Canadian.<br>Your program should interact with the user in the following way.<br>• The user should type a word (not to exceed 64 letters) and if the word appears to use American<br>spelling, the program should echo the Canadian spelling for the same word.<br>• If the word does not appear to use American spelling, it should be output without change.<br>• When the user types quit! the program should terminate.<br>The rules for detecting American spelling are quite naive:<br>• If the word has more than four letters and has a suffix consisting of a consonant followed by or,<br>you may assume it is an American spelling, and that the equivalent Canadian spelling replaces the<br>or by our.<br>• Note : you should treat the letter y as a vowel.<br>Sample Input<br>co lor<br>for<br>taylor<br>quit!<br>Sample Output<br>colour<br>for<br>taylour<br>

Extracted text: Americans spell differently from Canadians. Americans write neighbor and color while Canadians write neighbour and colour. Write a program to help Americans translate to Canadian. Your program should interact with the user in the following way. • The user should type a word (not to exceed 64 letters) and if the word appears to use American spelling, the program should echo the Canadian spelling for the same word. • If the word does not appear to use American spelling, it should be output without change. • When the user types quit! the program should terminate. The rules for detecting American spelling are quite naive: • If the word has more than four letters and has a suffix consisting of a consonant followed by or, you may assume it is an American spelling, and that the equivalent Canadian spelling replaces the or by our. • Note : you should treat the letter y as a vowel. Sample Input co lor for taylor quit! Sample Output colour for taylour

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here