ERROR IN CODING? Answered
The code which is given by the tinkercad and the one given in between the lines vary. The if statement in the FADE section differs. In tinkercad, they have used "==", but in the sample given in between lines are ">=" and "<=".