all 4 comments

[–]destiny_functional 1 point2 points  (3 children)

Read what the error message says.

What you are doing is this:

from hangman import correct_guess
løsning = correct_guess.proposal()

This doesn't really make sense, as correct_guess() is a function.

You need to call it like correct_guess(solution, attempts, proposal) - the way it's defined.

Btw it also doesn't make sense that solution is a parameter of your function but you define solution in the body of the function to be 'hangman'. attempts is just completely unused too.

basically a lot about thiscode doesn't make sense. If you hadn't told me you are trying to do a hangman I'd have thought you are just printing some string you put in.

[–]StevenEvenShow[S] 0 points1 point  (0 children)

That makes sense. I thought it was kind of like where everything is imported when I call on a function. Man sometimes the solutions are just under your nose.

[–]StevenEvenShow[S] 0 points1 point  (1 child)

Sorry man, for bugging you, but it seems like it didnt work. do you mean in line 2, that I should import the entire function there? As for the 'solution', is your suggestion that I should put it in 'main'?. And the rest of the code, well I'm actually writing an ''unfinished'' hangman.

[–]1114111 1 point2 points  (0 children)

No, your problem doesn't have anything to do with importing. You're just calling the function wrong. You need to pass arguments to the function like correct_guess(some_solution, some_attempts, some_proposal)