#๐ Can anyone help easy question
15 messages ยท Page 1 of 1 (latest)
@olive peak
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.
Swap 1. and 2. line
Python always executes your program in a sequence, from the first line forwards. When it starts from the first line, it has no idea what the others are doing, and so it doesn't know what the variable message is
Big thanks and why is this?
Message variable is assigned after you are trying to replace string inside
It must be in chronological order
So basicly it needs to know the message before using it in a print code
You have to assign the value first
yeah the message
By doing
message = "String"
It's like saying
The sentence is Adolf```
But python has to do the first part first, it just can't wait until you say what the sentence is
alright what should be the next thing a learn after this
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.