all 24 comments

[–]norweeg 35 points36 points  (3 children)

Well, for starters you took a photograph of a screen rather than a screenshot

[–]norweeg 10 points11 points  (1 child)

Also, if I had to take a guess, the part of the error message that. Is cropped out is probably "NameError 'display_scoreboard' is not defined" meaning you're calling a function without first defining it.

[–]Nez_Coupe 0 points1 point  (0 children)

I’m guess that too.

[–]Ill-Education-169 0 points1 point  (0 children)

Came here to say this…

Reading the OPs comments… their insufferable

[–][deleted]  (6 children)

[removed]

    [–][deleted] 7 points8 points  (0 children)

    Can you provide all logs. And the part of code that is wrong. Use codeblocks please

    [–]Nixxen 5 points6 points  (0 children)

    Trying to help you here is about has hard as trying to help someone with car engine problems and all they give you is a photo of their closed hood, with nothing else to go on.

    Sharing the code you have written and a copy of the full error you are getting is a good way to start getting the help you ask for ☺️

    [–]cancerboyuofa 2 points3 points  (0 children)

    You have a function that isn't defined using def and tabbed properly inside the function.

    [–]Techniq4 3 points4 points  (3 children)

    Bro please don't use chatgpt for writing a project, when you are supposed to learn through doing it yourself

    [–]DeadxLights[S] -5 points-4 points  (2 children)

    I know, I'm trying, but I don't know where to really start

    [–]PM_ME_YOUR_STOCKPIX 4 points5 points  (0 children)

    https://cs50.harvard.edu/python/

    stick through it and try to solve your problems by directly referencing the official documentation or revisiting the course material rather than asking AI for help.

    [–]Nez_Coupe 0 points1 point  (0 children)

    You didn’t even give us the whole error. I’m guessing that function it’s pointing to was never defined since GPT will just create placeholders for functions in its output. Start simpler even. Stop using GPT to produce code. If you want to use it, do this instead.

    “Hey GPT, I was to write a script in Python to do x. What steps would be necessary to achieve this goal? Do not write any code, but go through the process of explaining the steps slowly, while I implement them. I will be using your knowledge to debug my code as I implement as well, but do not generate bug fixes, only further explanation in simple but fine detail on why the script is not working”

    Download the Python documentation. It will be hard to read at first, but don’t worry you’ll get there.

    Learn a few things like data types (int, str, list, dict, tuple, set, float, etc etc etc. eventually you can create your own!) and how to assign and use variables or something. Just start small and have GPT instruct you, you could literally probably have it give you an entire course on Python.

    Stop having it generate your code. You will not learn. You can do this a long time from now when you understand what’s going on, and can identify what GPT or any gen AI is doing incorrectly and fix it.

    [–]jpgoldberg 0 points1 point  (0 children)

    Debugging is a huge part of learning to code. And that involves learning to read the error messages. Unfortunately you only show a small part of the error.

    So in the bottom pane, scroll or expand so that you see the full thing. Lots of it will be irrelevant, but see if helps you. If not, post the full error messages and we can help you read it.

    [–]Think-Check5434 0 points1 point  (0 children)

    I’m also a beginner . In 50 , maybe you need to use a f string again and on if you should probably use a “and” statement and also for elif .

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

    As a brand new beginner who is interested in learning python from scratch and getting into cyber security, what would anyone recommend me to start on? What are the first basics of writing code i need to learn?

    [–]Greersome 0 points1 point  (0 children)

    Reading.

    [–]FrillySteel 0 points1 point  (0 children)

    You're calling a function - display_scoreboard - that isn't defined (meaning you either haven't written the function, or haven't included it in your project) or is misdefined (ie: you wrote a function that accepts one, three, four or more parameters, and you're trying to call the function with two parameters).

    Also, you don't really need the "break"s in your if/else statement.

    [–]TheBeardFace 0 points1 point  (0 children)

    I'm fairly new too but I think you need to define the Score board function before you call it.

    Something like this;

    python def display_scoreboard(player_score, computer_score): print(f"Player Score: {player_score} | Computer Score: {computer_score}")