#πŸ”’ Homework (1/4 questions)

129 messages Β· Page 1 of 1 (latest)

analog oak
trail prairieBOT
#

@analog oak

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.

analog oak
#

its supposed to print this right?

lusty marlin
#

You’ll have to create the tortoise.txt file yourself.

analog oak
#

a pythonj file

#

or a regular file

lusty marlin
#

No, a text file

#

Since you want to read from tortoise.txt

#

Do you have example input files or something similar?

analog oak
#

no sadly and these are the papers before the assignment if you wanted to see them

lusty marlin
#

Or maybe an online judge or something you have to submit your code to?

analog oak
#

online judge? like a teacher?

lusty marlin
#

Online judge as in a robot that just tests your code to see if it works.

analog oak
#

ohhh

#

i never knew that

#

it still doesnt work

slate spire
#

You need to put the tortoise.txt file together with your source code file.

lusty marlin
#

Make sure they’re in the same folder

analog oak
#

hmm

slate spire
#

Well, since you moved your source code, you need to also change the path you run the source code.

analog oak
#

i resaved and it still says file not found

slate spire
#

It's because you saved the file at D:\python, not at D:\python\hw 7 in VSCode.

analog oak
#

ohh

slate spire
#

Now you have the file in the python folder again

#

Reopen the file you moved in VSCode.

analog oak
#

why am i making this so difficult lmao

slate spire
#

Try manually running the command:

cd "D:/python/hw 7"
C:/Users/Tucso/anaconda1/python.exe madlib.py
analog oak
#

does my code look right? cuz if it does ill just move onto the next question

#

this is so annoying

slate spire
#

My bad. It should be C:/Users/tucso/anaconda1/python.exe madlib.py. should be lowercase username.

analog oak
slate spire
#

Hmm. Try adding & at the start. I don't usually use powershell, so pardon my mistakes.

analog oak
slate spire
#

Oh my god I'm so dumb

#

It should be anaconda3

analog oak
#

what?

#

\

#

oh

#

one sec

slate spire
analog oak
slate spire
#

You're still in C:\Users\tucso. Do the cd D:/python/hw 7.

analog oak
slate spire
#

You put e accidentally at the start of your command?

analog oak
#

ths is so annoying

slate spire
#

Uh, cd "D:/python/hw 7"

analog oak
#

ohhhhh

slate spire
#

Yes

#

Then run C:/Users/tucso/anaconda3/python.exe madlib.py

analog oak
#

hmm so now my code is wrong

#

i think

#

15 and 36

slate spire
analog oak
#

in it?

#

like the link

slate spire
#

In the tortoise.txt file

analog oak
slate spire
#

Uh, the text in the website

analog oak
#

ohh

slate spire
#

Like, fill the file with a lot of words

analog oak
slate spire
#

Yes. Save the file and rerun the script

analog oak
#

BOOM

#

weird tho

#

why do you think it has the - at the top

#

hw page

slate spire
#

It's from line 20 of your code

analog oak
#

oh

#

ima delete that like rn

#

alr perfect

#

so now I know the code works

#

do you think it will be messed up if i put it in another file? for my homework

#

i have a template i use but if it will mess it up it is fine

#

i wont do it

slate spire
#

pardon but put what in what?

analog oak
#

thats what i mean

slate spire
#

ah

analog oak
#

wait one sec

#

lemme look at my hw

#

rq

#

seperate files i guess

slate spire
#

Yes, you can put all your code in the main function

analog oak
#

i think it will be fine if i keep continuing

#

i just added tht

#

the main

#

34,36,37

slate spire
#

Yeah, you can do that too

#

And add some documentation so you can get some score πŸ˜‰

analog oak
#

yea of course

#

i will do that at the end now

#

i need to do number two

#

i am working on it so far

#

im almost done

slate spire
#

πŸ‘

analog oak
#

hmm is it supposed to list theseEnter noun:
Enter plural noun:
Enter verb:
Enter verb past:
Enter adjective:

#

because all i have are plural nouns

#

do i need to put if statement and elifs statements in?

slate spire
#

Lemme see

#

What about storing multiple inputs?

analog oak
#

this is confusing me

#

no matter what i do i cant print verb

#

i think i got this tho

#

m,aybe i only ened it for this question

slate spire
#

Uh, sorry but I gtg

analog oak
#

thats okay

trail prairieBOT
#
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.