I'd do that, but it's not that simple. There's no way in CBOT to check how many times a specific instruction was used in a program or what was drawn on the ground.
When you fulfill all objectives it spawns TNT in some obscure place, and wins mission. Then either change robot to something else (Me? Tech?) or put program into level controler
Well, it's not really possible to lose in exercises in most cases and it only enables additional button in SatCom, not program, so that'd need to be changed in the code.
Chapter 1 of the new programming course is done and ready for beta testing. The solution programs are available, but they won't be in the release unless the player checks the "Solution" checkbox or smth, which I don't know how to do. Chapter 2 requires some advanced end mission conditions and I have no idea how to do them, so I guess I'll have to wait for @krzys_h . Have fun and note any tiny mistake, typos, grammar errors, level problems, and so on. I also hope you'll like it as I didn't precisely followed the script, so some details have changed.
I am pretty sure downward momentum is separate for Me, Jets, wasps and falling resources separately, and otherwise there is no gravity at all, as for Colobot physics