#๐ code has no errors but does not print something
27 messages ยท Page 1 of 1 (latest)
@south rivet
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.
im sorry having trouble sharing it. i shared everything but it tells me to use a pastebin and its my first time using this
copy and paste
i did that but it just deletes the code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Alright. And what are you expecting it to do?
ok so the problem with this is, the code runs fine, the hangman games works perfectly. the issue is theres a function at the end called hangman_with_hints and through that function the code is supposed to print possible other words that match the word we are currently guessing. we are supposed to see the matches when we type an asterisk. but when i do that nothing happens and i cant seem to find the issue
theres a part of the code at the end that says when you uncomment these two lines and comment the following lines you play a hangman game where you get to use hints. i do that and it still doesn't work
Did you write this code?
no i wrote the difficult functions using AI
Ah, so you cheated
its been a few months since i started writing i really can't type code properly myself ๐ฅฒ
Well, that's cause you're using AI
How are you going to learn that way?
Anyways, what have you done so far to debug/narrow down the issue?
i thought the issue was with match_with_gaps
that it hasnt been called in any function?
Looks like show_possible_matches calls it
oh so it's been called through that function. another thing i thought might've been the issue was in the hangman function i use .isalpha() to check if the user is typing any other character, so obviously if i type and asterisk is would've caused the user to lose a warning. so i added a statement that didnt remove a warning when an asterisk is type but it just doen't type anything when i do that
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.