Fail! Fail again! Fail better!
You may find that you went down a wrong path.
Don't worry, that's normal. Your supervisor would've prevented
it had (s)he seen this coming - so you've all learned
something.
Redo from start
Sometimes you realise - belatedly - that the project should've
had a different focus. Be realistic: will restarting benefit the
project? If yes, then restart. On the other hand, if you cannot
restart and still finish in time, don't restart - but do
clearly formulate your insights in your project report!
Explain why you made those choices (e.g. "only by
doing it this way could you experience its shortcomings", or "we
didn't study literature well enough and therefore missed a
well-known solution").
Collaboration
If your project is team work, you're going to have to
collaborate.
Use (online) tools for this: version control, chat, video
conferencing, report writing, etc.
Play to each other's strengths.
Everyone contributes, but not to every part an equal
amount.
If someone's slacking off or skiving off, it's up to the
team to address this, not up to the supervisor. Do keep the
supervisor informed (i.e., be honest).
A project is more than programming
You're expected to be able to program. That's not what's going
to get you a pass grade. It's necessary, but not sufficient.
What's going to get you a pass grade is how you report about
your project. What you learned, what mistakes you made, what
technical challenges there were and how you solved them,
etc.