Question: What is the difference caused by using “nope” instead of ”no”?

Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it?

Answer: 
"Nope" is informal. You wouldn't usually want to use it, for example, answering questions for a job interview, but it would be an appropriate answer to a friend's question "Have you seen that movie yet?"
Nope is used informally, normally during chat where you want to give a quick, fluid answer to a question without halting it like 'No' would.

They both mean the same thing, and 'Nope' is very rarely written.