#๐Ÿ”’ Handing in work, paths for files

54 messages ยท Page 1 of 1 (latest)

whole solstice
#

Is there any 'standard' I should use
Handing in my work in a zipped file with dictionary.txt inside the file with the python code file.

harsh cargoBOT
#

@whole solstice

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.

worthy igloo
whole solstice
#

ye there is none ๐Ÿ˜…

#

i read the pdf like 208 times

desert horizon
#

!code

harsh cargoBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

desert horizon
#

When posting code, post it as text.

#

Not as an image.

worthy igloo
#

This screen shot is fine...

desert horizon
#

It is not the entirety of the code.

#

Even were it so, text is preferred.

whole solstice
#

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?

worthy igloo
#

Relative path makes sense if you're turning it in like that

whole solstice
#

./ needed or no?

#

or just the name

worthy igloo
#

No

whole solstice
#

just the name ye?

worthy igloo
#

Correct

#

You can test that too ...

whole solstice
#

ty just trying to not have a reason for them to take easy marks

worthy igloo
#

Can you post the PDF?

whole solstice
#

just not the run code button

#

cant send pdf

worthy igloo
#

That you can screenshot

#

It's dangerous to open random PDFs from Internet strangers ๐Ÿ™‚

whole solstice
#

ah

#

i ss now

worthy igloo
#

Do you have the rest of the game? Or just the file reading part?

whole solstice
#

i got the reset ill send now

desert horizon
#

For your consideration, random.choice.

#

Also, if you don't have to load up a file multiple times, don't.

#

Load it once.

whole solstice
lament crater
#

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.

desert horizon
#

!e py import random choices = 'Apples', 'Pears', 'Bananas' choice = random.choice(choices) print(choice)

harsh cargoBOT
whole solstice
#

oh instead of chosing random line

desert horizon
#

!e py text = '''Apples Oranges Bananas Pears''' result = text.splitlines() print(result)

harsh cargoBOT
lament crater
# whole solstice yea i have it

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.

whole solstice
#

yea after re reading it

harsh cargoBOT
#
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.

#

๐Ÿ”’ Handing in work, paths for files