Most gasoline powered lawn mowers use a starting mechanism with a pull cord and a spring return. Over time, friction can damage a pull cord to the point that it breaks. With care, replacing the cord is not difficult. When replacing the cord, try to use at least the same length of cord as in the original assembly. In most cases, adding a bit more won't hurt. However, making it too short may reduce the efficiency of the starter.
Remove the top cover from your mower. The top cover is the cover over the pull starting mechanism. This cover is usually held in place with three or four bolts.
Lift off the starter component with the reel for the pull cord. On some mowers, there may be a single bolt in the center holding the starter in place. If so, remove this bolt.
Remove the knotted end of the old pull cord from the starter mechanism. On some starters, this area may be covered by a metal plate held in place with a bolt. If so, remove the bolt to remove the plate to access the knot for the old cord.
Thread the replacement rope through the hole from which you removed the old, broken cord and tie a knot in the end.
Thread the pull handle onto the other end of the rope and tie a knot.
Pull the rope through to set the new knotted cord in place and re-assemble the starter mechanism if you had to disassemble it to access the old cord.
Wind the spring in the assembly to ensure adequate tension to pull the cord back in after being pulled. How many turns this will take will depend on the exact mechanism and mower, but in general, three or four full turns should be enough.
Wind the new curd around the pulley and re-install the starter mechanism. Bolt it down tightly and check the spring tension. If you don't have enough tension to pull the new cord back into the pulley after starting, disassemble the starter and add more turns to the spring mechanism.