Put 2 codes together! (School project)

You don't "put the void loop" from one sketch into the other.

You might put some, or all, of the code from the loop() function in one sketch into the loop() function in another sketch.