(file_path, given_value)
| 44 | |
| 45 | |
| 46 | def cumulative_frequency(file_path, given_value): |
| 47 | cumulative_freq = 0.0 |
| 48 | with open(file_path, 'r') as file: |
| 49 | frequency_dict = json.load(file) |
| 50 | |
| 51 | for right_value, frequency in frequency_dict.items(): |
| 52 | if float(right_value) <= given_value: |
| 53 | cumulative_freq += frequency |
| 54 | |
| 55 | return cumulative_freq |
| 56 | |
| 57 | |
| 58 | def read_goodness_from_dict(file_path, value): |
no outgoing calls
no test coverage detected