#๐Ÿ”’ I need help for my code, I'm a beginner on python

46 messages ยท Page 1 of 1 (latest)

copper cloak
#

My teacher leaves me a comment: Try playing it if you were to win, and then again if you were to lose. It doesn't get to the end screen. but I didn't know how to fix it

buoyant micaBOT
#

@copper cloak

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

tawdry umbra
#

you need to show your code

copper cloak
#

Sorry

#

@tawdry umbra ?

bold belfry
#

What is the problem?

copper cloak
#

The teacher told me that when you win the game or lose, it dosen't get to the end screen but I don't know how to fix it

#

@bold belfry

bold belfry
#

Why does your teacher have to tell you this? Are you not able to run the game yourself?

copper cloak
#

he leaves me a comment

#

I do have a coding at school

#

I'm a beginner

bold belfry
#

I think you need to play the game yourself to see what happens when you win or lose.

copper cloak
#

I play it

copper cloak
bold belfry
#

So you played it and didn't see the end screen either?

copper cloak
#

Yes

bold belfry
#

But it is displayed.

copper cloak
#

Yes

#

wdym the end screen?

bold belfry
#

Yes, the end screen is displayed at the end of the game. Maybe you were distracted and looked somewhere else while it was shown.

copper cloak
#

I don't understand what does he means

bold belfry
#

It's only shown when you win the game though.

copper cloak
#

Yeah

#

but I don't , so the end screen is when it shows you win or loose?

bold belfry
#

Yes, the end screen is when it shows if you have won or lost.

#

But it's only displayed when you have won. It's not displayed when you have lost.

copper cloak
#

I add a you lost screen

bold belfry
#

Yes, but you don't display it.

copper cloak
#

I added now

#

It works

#

For me , his message dosen't make sense until you explained me

bold belfry
#

Ah, probably I wasn't good at explaining. I wasn't sure if you actually tried playing it. It should be obvious there's no end screen when you lose.

copper cloak
#

Not you, I talk about the teacher

#

You explained very clearly

bold belfry
#

Okay, thanks.

copper cloak
#

Thank you for ur help

#

It's a good server tho

copper cloak
#

@bold belfry

#

I got an error while adding a sound, in the first line,I got this error: File "main.py", line 1
import pygame
^
IndentationError: unexpected indent
๎บง

bold belfry
#

Don't indent the line then.

#

You only indent statements when they're inside a loop, if, etc.

buoyant micaBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.