Project coding Question

I have run the program and it worked running the motor forward faster then at its peak slows it down again till it goes into a reverse direction and repeats this.

Good, because that is what it is supposed to do. Do you understand why/how it works ? Did you try changing the program in any way to make it do something different or the same thing but slower or faster maybe ?

By experimenting like this by changing code that works you will understand better what is possible and how. If an experiment does not work then try to work out why and try again. You want motors to speed up and slow down at a random rate. What is it about the program that controls the rate of speeding up and slowing down ? Can you change it ? Can you make it random ?

At some point you will need to stop using the delay() function but that can come later.