r/learnpython • • Nov 05 '20

How does one learn to make well-structured programs? Mine are dumpster-fires.

So I just (kind-of) finished reading Automate The Boring Stuff With Python, and for the past month I've felt like a big-brained super-hero automating myself out of a job (Data Analyst).

The problem is, I feel I missing something along the way. I don't understand the proper way to use functions, what a class is, why people have multiple files in a program, how/why people use GitHub...probably some other things I haven't discovered yet.

They all seem to be related to organization? Is there a "How To Structure Your Python Stuff With Python" book?

478 Upvotes

98 comments sorted by

View all comments

0

u/Cayde-6699 Nov 05 '20

GitHub is the website where programmers go to ask question like u have here on Reddit or u can go to stack overflow it’s also a website where employers will look to see if u have an account to see that u know what your doing.Functions work just the same as a variable but bigger the same way u would put x=5 in function form would be def plus(number): x+=number print(x)

So you would call this function just like the variable but filling in the number you want to add to x let’s say it’s 10 u would do

plus(10)

This would print the number 15.

Classes are a little more complicated I suggest going to w3schools website for python this teaches a lot on everything for python but u should wait until u have a good understanding of functions