Could someone merge these two codes into 1 code

It is very unlikely that somebody will do this work for you. The result of the ratio between

your effort versus helper effort is too low
in example numbers
your effor 0,1 vs users effort 10

If you yourself start on merging the two sketches and are stuck at a specific point and then ask a specific question you will get support.

best regards Stefan

3 Likes