#๐ small problem
20 messages ยท Page 1 of 1 (latest)
@drowsy belfry
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.
have you learned about if yet?
yes one second sir ill post
it could also be done without if, but you wouldn't do first, last = name.split()
instead just do full_name = name.split()
and then when displaying their name to them, you can use full_name[0]
Have a read of what I just wrote above
it's generally not a good idea to use multiple assignment when you can't guarantee the length of the data
in this specific case, where your actions are the same, but the context changes (like calling print each time, but with a different string).
you could make use of a dictionary. mapping each number to a sentence.
This help channel has been closed. 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.