#๐ Handing in work, paths for files
54 messages ยท Page 1 of 1 (latest)
@whole solstice
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.
Standard for what? I would follow the instructions you were given
!code
This screen shot is fine...
i dont know what to call it, the bit where the name of the file is
like the path
if they are to download the file and just run straight away which would i need to put there, just dictionary.txt?
Relative path makes sense if you're turning it in like that
No
just the name ye?
ty just trying to not have a reason for them to take easy marks
Can you post the PDF?
when i download it i can run it with python debugger
just not the run code button
cant send pdf
That you can screenshot
It's dangerous to open random PDFs from Internet strangers ๐
Do you have the rest of the game? Or just the file reading part?
For your consideration, random.choice.
Also, if you don't have to load up a file multiple times, don't.
Load it once.
wait what do you mean random.choice?
Just reading the assignment screenshot, it sounds like they will be providing a 'dictionary.txt` for you. So I would not expect to submit your own.
yea i have it
!e py import random choices = 'Apples', 'Pears', 'Bananas' choice = random.choice(choices) print(choice)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
Apples
oh instead of chosing random line
!e py text = '''Apples Oranges Bananas Pears''' result = text.splitlines() print(result)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
['Apples', 'Oranges', 'Bananas', 'Pears']
I particularly mean: don't submit it with your code. Also, they might choose to run your code against a different dictionary file as a test.
i missed this
yea after re reading it
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.
๐ Handing in work, paths for files