Scenario: Me and my friend (i'm 15 and my friend is 16 years old) were at hacker games contest!(basically an event where you have 48 hours to create software/game and present it to the public). After the contest two people contacted us asking to make an app. We didn't know how to react, so we just agreed. The app is almost finished. We worked really hard on this app, we expect to get paid. The problem is that we forgot to talk about the price at the beginning. So should we ask for money? If yes, how?
Yes, you certainly should have talked about money before doing a lot of work. But that's water under the bridge.
I'd simply contact whoever it is you've been talking to sand say, "Hey, we've made good progress, it's about time we talk about money."
If they say they weren't planning to pay you and they thought you were just doing this for fun, you can just say that that's too bad and you're sorry for the misunderstanding but you're not going to hand over the code you've spent so much time on for free.
You can give a number to start negotiations, or you can let them give a number first. If you give a number, make it high but not absurd. Remember, whatever number you give, they are going to negotiate you down from there. Once you give a number, that's the maximum. If they give a number, negotiate up from there.
You can ask for a flat fee, $X upon completion of the job. It's a little late to suggest an hourly rate if the work is mostly done. Don't accept a flat fee with open-ended requirements. i.e. don't say $X and we'll keep working until you're satisfied, because then they can nitpick you to death.
Before you turn over the code, get an agreement in writing. Not because you don't trust them, but to avoid misunderstandings. Verbal agreements often fall apart because the two sides had conflicting assumptions, like X thought the agreement was $5000 for the first draft of the code, with updates to cost extra, while Y thought it was $5000 for the final complete debugged version. And no matter how well you're getting along now, things could turn sour later for any number of reasons. Get it in writing while you're on friendly terms.