im currently in AP Comp Sci Principles and I am learning python, but at a far slower pace than id like, and i enjoy it and want to learn it on my own time, however, i dont want to spend money. I thought Code Academy would be a good place to start but you have to pay to learn python. Where can I learn python in a similar manor to Code Acadmey, but free?
#๐ where should i start?
68 messages ยท Page 1 of 1 (latest)
@livid pebble
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
there are lots of free learning resources
!resources
Resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
mb i didnt see that link
here is a filtered selection: https://www.pythondiscord.com/resources/?topics=general&type=course%2Cbook&payment-tiers=free&difficulty=beginner
CS50P from Harvard University on the edX learning platform comes highly recommended: https://pll.harvard.edu/course/cs50s-introduction-programming-python
the online version of the book "Automate the Boring Stuff with Python" is made available for free by it's author (under "Table of Contents" a bit further down on the page): https://automatetheboringstuff.com/
@livid pebble is this your first programming language or have you learned to code in any other language before?
first programming language
both of the above resources lend themselves very well to people that have not programmed before
the course is video based with a web site where you can both read and do different exercise/assignments to practise and test your knowledge
there is one thing that is the most important when learning to code, it's to write code yourself and play around with the code, see what it does when you change things, learn by doing
thank you homie
you are always welcome back here if you have questions regarding python ๐
well speaking of i just started the "automate the boring stuff" thing and how does python do order of operations when it comes to math? i am currently trying to do 2(6+2(2)) which i wrote as 2 * (6+2(2)) and a few other ways but i keep getting answers like 14 and 20 when it should be 32
maybe i just dont know basic math or i wrote smth wrong but idk
2 * (6+2(2))
<python-input-6>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
File "<python-input-6>", line 1, in <module>
2 * (6+2(2))
~^^^
TypeError: 'int' object is not callable
2 * (6+2 * 2)
202 + (6+2)
10
2 * (6+2*2)
20
6 + 2 * 2 * 2
14
6 + 2 (2 * 2)
<python-input-11>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
Traceback (most recent call last):
File "<python-input-11>", line 1, in <module>
6 + 2 (2 * 2)
~~^^^^^^^
those are the ways i tried
you need to have operations between things, you can't just have parentheses in python to mean multiplication, you need to write out the * operator there
so 6 + 2 * (2*2) ?
!e
print(6 + 2 * (2 * 2))
print(6 + 2 * 2 * 2)
:white_check_mark: Your 3.13 eval job has completed with return code 0.
001 | 14
002 | 14
those two will do the exact same thing
as python follows PEMDAS as long as you write out the multiplication sign
!e print(6 + 2 * 2 ** 2)
:white_check_mark: Your 3.13 eval job has completed with return code 0.
14
because i am trying to get it to output 32 using pemdas but i think im just slow
oh, that was what you were after?
nah, im trying to get output of 32
writing it normally here for sake of explanation:
6 + 2(2 * 2)
8(4)
32
i expect whats in the parantehses to be multiplied on its own before being multiplied by the original equation
like the (2 * 2) should be equated to 4 instead of being tacked on to the equation
and if we used python logic id assume it would end up as 22 not 14 because it would distriubute the 2 so
6 + 2 * (2*2)
6 + 4 X 4 X 4
22
oh, now i see what you are doing, right
then you need to
!e
print((6 + 2) * (2 * 2))
:white_check_mark: Your 3.13 eval job has completed with return code 0.
32
ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
that makes more sense
it does both in parenthese first then multiplies those answers together
!e
print((6 + 2) * 2 * 2)
:white_check_mark: Your 3.13 eval job has completed with return code 0.
32
this works just the same
maybe you should look into numpy and scipy if you want to do more advanced math with python
!d numpy
NumPy reference
Release:
: 2.4.dev0
Date:
: September 13, 2025...
Similar names: matplotlib.numpy
!d scipy
SciPy documentation
Date: September 12, 2025 Version: 1.17.0.dev
Download documentation: https://docs.scipy.org/doc/...
but you probably want to learn the basics of the language first
yeah I'm basically going through the guide or book and seeing what it says and testing it out to make sure i understand it, i mostly plan on python to 1. understand the basics of programs 2. robotics and 3. mini projects and mini games
thats why i brang up math bc its seen in the start of the book
you might eventually cross paths with numpy then
and if you are going to do robotics you might also some across some of the machine learning libraries
you can use idle that comes with python, but at some point you will want to move to either vscode or pycharm, both are really popular in our community and sometimes it can feel a bit like vi vs emacs
the next step up from idle would be something like thoony
but as i said, later on you will probably move to one of the other two that most people in the python community use
should i just skip to using vscode? or is there an incentive to the other ones and should i start there or move on to it after learning the basics
the only problem with vscode these days is that it comes with Microsoft GitHub Copilot so very integrated and "too easy" to enable, which mostly isn't a great thing while learning for many people
and you are responsible for creating your own venv for projects
something pycharm does for you by default
each IDE or editor has their pros and cons
for vscode you would want to install the python extension from microsoft if you haven't already (it will actually install three different python related extensions)
I use visual studio code
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.