Question: write this as a python code with the write intendation please. CSc 120: Primary stress position Context This is a sub-problem of the long problem
write this as a python code with the write intendation please.
CSc 120: Primary stress position Context This is a sub-problem of the long problem for this assignment, namely, rhyming words. Expected Behavior Write a function primary stress position (phoneme_list) that behaves as follows. The argument phoneme_list is a list of phonemes, as described here. It returns an integer that is the position of the primary stress phoneme (i.e., the phoneme with the main stress) in phoneme_list. If there is no primary stress in phonemelist, your function should return None This document describes how the primary-stress phoneme is indicated You can assume that there is at most one primary-stress phoneme in phoneme_list. Examples . primary_stress_position(, 'IYl', K.L','IYo'1) Return value: 1 Reason: the return value is the position of the primary-stress phoneme, 'IYl', in the argument list of phonemes. Comment: The argument list of phonemes gives the pronunciation of the word WEEKLY 2, primary-stress-position (['K', Return value: 5 Reason: the return value is the position of the primary-stress phoneme, 'UW', in the argument list of phonemes. Comment: The argument list here is the pronunciation of the word cOMPUTERIZE. .AHO', 'M', 'P', . 'un1', 'T', 'ERO, .AY2 ', 'z']) 3. primary stress_position ('R', "AHO', K', Ao1', 'R, 'D' 1) Return value: 3 Reason: the return value is the position of the primary-stress phoneme, 'Ao1', in the argument list of phonemes. Comment: The argument list here is the pronunciation of the word RECORD 4. primary stress_position ( EY1', 'K']) Return value: 0 Reason: the return value is the position of the primary-stress phoneme. ' EY1in the argument list of phonemes Comment: The argument list here is the pronunciation of the word ACHE. 5. primary-stress-position ([ 'AHO', Return value: None Reason: the return value indicates that there is no primary stress phoneme in the argument list. Comment: The argument list here is a pronunciation of the word oF 'V'))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
