(steps)
| 105 | |
| 106 | print("Example 5") |
| 107 | def wave_modulating(steps): |
| 108 | step_size = 2 * math.pi / steps |
| 109 | amplitude = yield # Receive initial amplitude |
| 110 | for step in range(steps): |
| 111 | radians = step * step_size |
| 112 | fraction = math.sin(radians) |
| 113 | output = amplitude * fraction |
| 114 | amplitude = yield output # Receive next amplitude |
| 115 | |
| 116 | |
| 117 | print("Example 6") |
no outgoing calls
no test coverage detected