Sorry, there are NO ropes on a boat, only LINES. There may be, however, lines with the word "rope" in their names, such as the "bellrope".
The halyard holds the sail up. When a rope has an assigned job on a boat (or a ship) it is referred to as a line.
One thing to note: any rope that is secured to a boat is referred to being a "line" So, why is a bow line on a dinghy called a painter? ... why is a dinghy called a dinghy? It's just it's given name....
A painter
If you tie this rope to the boat, it won't drift away from the dock.