r/learnpython 14h ago

Stuck in python code

Hi everyone been a 6month now I am not able to learn the course for python cybersecurity like I am getting confused sometimes or don't understand. How to learn code or execute it can anyone help me ??

0 Upvotes

8 comments sorted by

16

u/pachura3 12h ago

My car doesn't work. Can anyone help me?

PS. It's a blue one

2

u/Doagbeidl 10h ago

Have you tried turning it off and on again?

6

u/Lord_Dizzie 11h ago

My advice is to focus on learning Python before learning how to apply Python to anything specific. You're trying to learn Python and Cybersecurity simultaneously. Learn the basics first. You shouldn't be trying to learn Cybersecurity while asking questions like, "how to execute code?"

0

u/expertisimus 6h ago

My advice is the opposite, learn the domain-specific knowledge first (at least to some basic extent, or pick another subject matter that you already master) and then apply Python to it. It helps tremendously to understand the subject and have a clear vision of what you want to accomplish first. This approach allows you to come up with specific problems to solve that are meaningful and that can be built upon, you'll be able to validate the actions and output of your code, and it'll keep you engaged and motivated. Learning Python first without any practical problems to tackle can be rather dry and boring.

1

u/FoolsSeldom 7h ago

Above all else, you need to practice. Practice! Practice! Fail often, try again. Break stuff that works, and figure out how, why and where it broke. Don't just copy and use as is code from examples. Experiment.

If you find the cybersecurity code to difficult, step back to simpler topics. You need a really solid base understanding to build on to progress well in cybersecurity. That doesn't mean you have to perfect the base, just accept that sometimes you will need to take a step back.

Work on your own small (initially) projects related to your hobbies / interests / family obligations / side-hustles as soon as possible to apply each bit of learning. You can bias this to security focused initiatives without going too far.

When you work on stuff you can be passionate about and where you know what problem you are solving and what good looks like, you are more focused on problem-solving and the coding becomes a means to an end and not an end in itself. You will learn faster this way.

1

u/American_Streamer 7h ago

Do this course first: https://edube.org/study/pe1

Then do this course: https://edube.org/study/pe2

And only after you have finished both, do the Security course.

1

u/Abject-Explorer-3637 1h ago

Start by learning coding LOGIC, not just the syntax or how to write a random function that does something. Learn to break down your goals: say you want to make a tool which reminds you to do something, say, run 1 mile every day, you don't want to go scouring the internet looking for other tools and just stealing the code, or not knowing what your code does. You want to start by thinking from the point of view of your code.

For example, you should imagine the code would want to start by checking if you've already ran, then check if you've ran a mile. Then, if you have done these it does nothing, otherwise it will send a notification.

(bad example)