Yotto Labs interview question

writing some basic program on paper , and explain the flow.