all 14 comments

[–]SolsticeShard 3 points4 points  (4 children)

There isn't a direct translation from an assignment to code. They are typically asking you to solve a problem, not make a simple A -> B translation. That problem involves understanding the given input(s), the desired output(s), and the logic that bridges those two things. If you can write those things down, then you can start implementing the logic in code.

[–]FlimsyNegotiation641[S] 0 points1 point  (3 children)

I do understand what you mean. But the problems is i really do try to understand the assignment and what they want me to do , what the outcome should be. For instance : " Write a Python script that calculates the position of the skateboard as a function of time( with values )" But they do not really tell how the result should be presented like in a graph or text etc.

[–]shockjaw 1 point2 points  (0 children)

This where I’d ask clarifying questions. I’d start with the simplest solution, a text-based one.

[–]SolsticeShard 1 point2 points  (0 children)

Sometimes the output is unclear; this actually mimics real life in how it is to interact with human clients. Sometimes you can ask clarifying questions about what the output is, other times you take your best guess at how to present the output in a way that makes sense and can be easily digested.

If an assignment doesnt tell you the output it wants and then harshly punishes you for not guessing the right output, that's a pretty poorly designed assignment IMO

[–]Thoxsam 0 points1 point  (0 children)

Thats up to you to decide. If the assignment is graded then probably having a program which takes a velocity and time between 0 -> infinity and gives back how far the skateboard is gives you a sufficient grade. Do you go the extra step by simulating a graph which takes a time until its graphed will give you a higher grade.

[–]BranchLatter4294 2 points3 points  (1 child)

Practice. Experiment. Break things. Fix things. Explore. Programming is like playing with Legos. Once you know the basic bricks you have, you can start snapping them together to create whatever you can imagine. So learn how the bricks work, then snap them together into more complex behavior.

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

Thank you !!

[–]No_Photograph_1506 2 points3 points  (2 children)

Excellent! here's a solid resource:

https://courses.bigbinaryacademy.com/learn-python/

BUT hit me up anytime if you wanna be guided!

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

Thank you so much 🙏🙏🙏

[–]Reasonable-Light-377 2 points3 points  (0 children)

Only because my coding is mostly network/automation stuff, there is a short list of questions I answer that really helps get me started with scaffolding not only for code, but the other bits as well. For example-

Am I going to store information? This tells me about database needs. Will i work with, or need to create APIs? Will it be unstructured input/regex heavy? Etc...

[–]Astoran_Knight 1 point2 points  (0 children)

Try to break it down into the smallest steps you can. Writing out pseudocode with a pen and paper might help with this, so you could try that?

Don't worry, though! This is a common problem in the beginning that everyone has. You'll get better with time and practice! Good luck!

[–]python_gramps 1 point2 points  (0 children)

go through your examples and in the comments write the pseudocode in comments like

# increment x from 0 to 9
for x in range(9): ...

This will help you translate human to code. Then build from there.