tput should match with the provided test cases below. converter_gen takes a generator object scores (which is iterable) and converts all the randomly generated scores between 0 and 100 to corresponding letter grades as follows: · [0-59) --> 'F' . (60-69] --> 'D 70-79 --> C [80-89) --> 'B [90-100] --> 'A' converter_gen function would cover scores between 0 and 100 only. It assumes that the scores in the input argument scores are between 0 and 100 (no validation is required). Both generator functions should use yiled to return the generated scores/grades. NOTE: . Your generator functions must return the scores/grades using yield statement and should match with the provided output: to
The output should match with the provided test cases below. converter_gen takes a generator object scores (which is iterable) and converts all the randomly generated scores between 0 and 100 to corresponding letter grades as follows: · [0-59) --> 'F' . (60-69] --> 'D 70-79 --> C [80-89) --> 'B [90-100] --> 'A' converter_gen function would cover scores between 0 and 100 only. It assumes that the scores in the input argument scores are between 0 and 100 (no validation is required). Both generator functions should use yiled to return the generated scores/grades. NOTE: . Your generator functions must return the scores/grades using yield statement and should match with the provided output: to be considered as a generator function. • The memory location and random numbers, of course, would be different in each execution
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images