Generating Sinusoidal Wave with Specified Harmonic in Python

Prompt

Result