r/learnprogramming • • 24d ago

Code Review School project: need help

So we have a school project where we made a game with multiple choice and in there we have life, In the start 3 lifes are available but it's not working after picking the wrong answer multiple times the life remain at 2 meaning only 1 wrong answer is recorded and minus from the 3

How do I make it keep minus the life? I use mit app inventory btw and I can send the pics of the code that our teacher though us and the code that I'm doing rn

PLEASE HELP ME

0 Upvotes

10 comments sorted by

3

u/gm310509 24d ago

At line 273 you are ....

Oh wait, without the code being shared that is just a WAG. We don't know how to do it because we don't know what you are doing wrong.

When posting code, post it as text using a reddit formatted code block.. The link explains how. That explanation also includes a link to a video that explains the same thing if you prefer that format. Note that that link takes you to a different subreddit - but the technique for posting code is the same.

-1

u/itsJyourgirlalu 24d ago

When making the post I can't find the button for the pictures but I put it here in the comments

3

u/paperic 24d ago

don't post picture, post the fornatted code.

1

u/gm310509 23d ago

Photos of all but the smallest code are useless. If someone wanted to try to recreate your project that won't bother if they have to do it from an image. Plus they are hard to read and often truncate stuff - usually the important bits.

That is why I gave you the "how to" to post it as text.

By ignoring suggestions like that, all you are doing is making it harder for people and wasting time. People won't bother unless you at least try to make it easier for them.

FWIW, I don't see your pictures that you mentioned.

0

u/[deleted] 24d ago

[removed] — view removed comment

-1

u/itsJyourgirlalu 24d ago

When making the post I can't find the button for the pictures but I put it here in the comments