Question: Please help! Coding with Python this is intro to python so try not to make the code too complex. THank u!!! A word chain is

Please help! Coding with Python this is intro to python so try not to make the code too complex. THank u!!!

A word chain is a list of words such that for each consecutive pair of words, the last letter in the first word is the same as the first letter in the second word. For example, the following list of animals forms a word chain: 'camel', 'leopard', 'dog', 'giraffe', 'elephant'. Write a function is_word_chain that takes a list of words(list of strings) called my_list as parameter and returns True if the list contains a word chain and False otherwise. Your list should have at least 2 words. Write a program q5.py to test your function.

Test your program with two lists of string, where one list represents a word chain and the other is not.

Also many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers to remember. On a standard telephone, the alphabetic letters are mapped to numbers

in the following fashion: A, B, and C =2 D, E, and F = 3 G, H, and I = 4 J, K, and L = 5 M, N, and O = 6 P, Q, R, and S = 7 T, U, and V = 8 W, X, Y, and Z = 9 Write a function translate_phone that takes a string that represents a 10-character telephone number in the format XXX-XXX-XXXX called phone_str as a parameter. The function returns a new string that has the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. Save the functions in a PyDev library module named a8_functions.py

Write a program p3.py to test your function. The program should ask the user to enter a 10character telephone number in the format XXX-XXX-XXXX. The program should pass the string to the function translate_phone and displays the returned string from the function. For example, if the user enters 555-GET-FOOD the program should display 555-438-3663. Test your program with 8 different inputs. Copy the results to testing.txt.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!