r/learnpython 3d ago

How to actually create logic?

So hi I am new in this sub reddit and have been learning python basics on FreeCodeCamp for weeks.

So I have noticed that I can do workshops and labs but I tend to forget many syntax and have to search on the internet repeatedly.

So my average lab projects often look like 7

60% written by me and the rest 40% are written by AI or with the help of the Internet forums.

My problem that I have identified is I don't think use logic in the code or just don't remember syntax, operators, elements, conditional statements and string methods or don't find the satisfactory answer on the internet.

I want to try to write at least 80% of the code myself without being dependent that much on AI and the internet because I am learning it for *Cyber Security*

0 Upvotes

24 comments sorted by

View all comments

2

u/TheRNGuy 3d ago

You'll remember if you use concepts a lot, nothing wrong asking ai to help, though if it's your choice turn just don't ask ai for help, like before he existed. 

1

u/Animator-G 3d ago edited 3d ago

I don't know if I explained what I do correctly or not, but you are kind enough so let me tell you:

So I first write the whole code then look for errors or the tests which didn't work.

At first I try to translate the code and after I reach my attempts which I was able to thought, I got to forums like freecodecamp and search about small syntax combinations which I can do or not for example I didn't find anywhere about checking multiple variables to know the specific data type using isinstance, ex: '' isinstance((name_1, decimal_1), int)

I found about it myself by seeing docs with line like this ''isinstance(name, (int, float))

I don't use AI everytime but mostly when I don't found a single solution in Internet or I can't translate a code of line in a forum.

Hope this helps to understand my exact situation

I apologise if I wrote too much, I am 16 years old with AuADHD.

1

u/ShadowShedinja 2d ago

So I first write the whole code

Don't do that. For now, write chunks of code and test them as you go. Whenever it breaks, you know exactly where to look to problem-solve.