Question: python please Consider the following dichonary which stores a list of war parler transisting English words to French words: dictionary - thouse': 'raison', 'aple':'parre', 'cree':'arbre',
python please
Consider the following dichonary which stores a list of war parler transisting English words to French words: dictionary - thouse': 'raison', 'aple':'parre', 'cree':'arbre', 'harsc': 'cheval', yellow':'jaune", "keyboard':'Clavier', 'water':'eu', 'start':'comencer'. 'city':'ville','car oreille', 'cel': 'anguille', 'Toath': 'dent'} Ar lunction called get_french word word dictionary, ward that takes a dictionary and words parametara. The function should return to French walthet or apenda to the Dremel Enaishward it the English word does not painte diction, the function should return an erregela Indicate that the particular word is not wanic. the words an empty string the functions ould return the comessa: "ERROR. Invalid word!". I the words of an invalid type the function should return the error message "ERROR. Iwald input!'. Note: you'm.ct us the try... cxccpt syntax and handic the KeyError in your soluton. You can assume that the dictionary is given For example: Test Result printi get_french_verdicictionary, 'house'! waison printiget_french_word dictionary. 'orange) ERR: orange is not available. printiget_french_wardicictionary, "I! ERROR: Invalid werd! printi get_french_werdeictionary, 2.51) ERR: Invalid input Answer: Ipenalty regme: 0, 0,5 10,16, 20, 26, 30 35, 40, 46,60 Hef get-French_wird distorcry.word): Pelungicutanary.word ] "error or O) is vttohle forwotnord)) return error recent les chaud. Toolid will return 'ENCR: ' word 'Invalic srput" 5 19 Precheck Check Expected Gol printract_french_nordidictionary, 'house's naise raison print oct_french_word dictionary, 'orange' ERROR: orange is not available. ERROR: Drange is not svailable. printipet_trench_nordidictionary, '') EFROR: Inwalid word! CRROR: 15 not available, x print_french and distinry, 2.5) EVTOR: Inwalid Inp.1! ERROR: 2.5 is dat available. not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
