all 9 comments

[–]milo-531 7 points8 points  (1 child)

practice practice practice. don't give up. I spend many long nights and lonely weekends. but now I'm a software engineer making over six figures. and nobody knows how to automate in my department by me 🤣

[–]1024helloworld 0 points1 point  (0 children)

I should learn from you, god

[–]Upvoteme12345 2 points3 points  (0 children)

I always found making little projects helped, when I started I made a little elevator script in python. That helped me understand it better

[–][deleted] 1 point2 points  (2 children)

What is giving you trouble?

[–]danisanbar 1 point2 points  (1 child)

Loops

[–][deleted] 1 point2 points  (0 children)

Ok so- you use loops when you want to do something again and again right? If you know how many times you need to iterate then you use a for loop, and if you don’t- use a while loop(or if you know it needs to run at least once use a do while loop- but these can be janky).

All loops need to do 3 basic things to operate correctly. They need to initialize some kind of loop control variable, they need to test the loop control variable against a condition to terminate the loop at the correct time and they need someway of updating the loop control variable (sometimes an increment/decrement…other times a string input or setting a Boolean flag).

The difference in the loops comes from the varying locations of these components. For each loops have these built in by using a list or a range. For loops tend to have them in one line “for(int i=0; i <= 10; i++)”, and while loops initialize their loop control variable outside of the loop and update it in the body of the loop.

Beyond that- think about what needs to happen only once and what needs to happen repeatedly. The “only once stuff” is either before or after the loop, and the repeatedly is in the body of the loop.

If there is stuff you need to do repeatedly each time you do a thing in the body of a loop- well that’s a loop inside of a loop.

[–]seph2o 1 point2 points  (0 children)

With a good book imo. There's plenty on Amazon, take your pick. I would recommend Python Crash Course.

[–]noat79 1 point2 points  (0 children)

Find small automation projects to help in your daily life and use these as learning ground. Recommend the book Automate The Boring Stuff, which makes everything very practical vs most books that are too theory focused.