#๐Ÿ”’ where should i start?

68 messages ยท Page 1 of 1 (latest)

livid pebble
#

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?

plucky warrenBOT
#

@livid pebble

Python help channel opened

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.

naive wave
#

!resources

plucky warrenBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

livid pebble
#

mb i didnt see that link

naive wave
#

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?

livid pebble
#

first programming language

naive wave
#

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

livid pebble
#

thank you homie

naive wave
#

you are always welcome back here if you have questions regarding python ๐Ÿ™‚

livid pebble
#

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)
20

2 + (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

naive wave
#

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

livid pebble
#

so 6 + 2 * (2*2) ?

naive wave
#

!e

print(6 + 2 * (2 * 2))
print(6 + 2 * 2 * 2)
plucky warrenBOT
naive wave
#

those two will do the exact same thing

#

as python follows PEMDAS as long as you write out the multiplication sign

livid pebble
#

!e print(6 + 2 * 2 ** 2)

plucky warrenBOT
livid pebble
#

because i am trying to get it to output 32 using pemdas but i think im just slow

naive wave
#

oh, that was what you were after?

livid pebble
#

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

naive wave
#

oh, now i see what you are doing, right

#

then you need to

#

!e

print((6 + 2) * (2 * 2))
plucky warrenBOT
livid pebble
#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

that makes more sense

#

it does both in parenthese first then multiplies those answers together

naive wave
#

!e

print((6 + 2) * 2 * 2)
plucky warrenBOT
naive wave
#

this works just the same

livid pebble
#

thank you

#

also should i use vscode or just python application, i have both

naive wave
#

maybe you should look into numpy and scipy if you want to do more advanced math with python

#

!d numpy

plucky warrenBOT
#

NumPy reference

Release:
: 2.4.dev0

Date:
: September 13, 2025...

naive wave
#

!d scipy

plucky warrenBOT
naive wave
#

but you probably want to learn the basics of the language first

livid pebble
#

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

naive wave
#

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

naive wave
#

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

livid pebble
#

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

naive wave
#

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)

heavy sandal
#

I use visual studio code

plucky warrenBOT
#
Python help channel closed for inactivity

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.