Dedrone Interview Question

Asked a python code to generate a signal