Python Tutorial for Beginners 1: Install and Setup for Mac and Windows
Why Stack Overflow recommends it
Stack Overflow users link it, and the wider Corey Schafer series, when answering beginners who need Python basics or help installing and setting up Python.
Recommended by 2 people across 2 different months, 2019 to 2022.
What it is
The first video in Corey Schafer's Python Beginner series, showing how to install Python on Mac and Windows. It also covers the interactive prompt and creating and running a first script.
What people said
Recommends Matiiss · 2021-08 · Stack Overflow · on “Understanding the code behind a gridtraveller”
I suggest tho that you take a look at some basic tutorials (such as these by Corey Schafer [this video] ) specifically this one (on topic): Python Tutorial for Beginners 8: Functions [LINK] , also this is on topic about recursion [LINK] and search for other sources if you need to understand this better
Recommends neotrix · 2022-12 · Stack Overflow · on “Explain this if-else condition in Python”
if num: means if num is different than 0 : if num!=0 . you better remove the else statement. def addition(num): if num: return num + addition(num - 1) return 0 python already knows that return is an else statement. here's a playlist of one of the bests on youtube by corey to learn & become at python : [this video] and also I recommend this book, automating the boring stuff with python. it's free : [LINK]
Cites Jack Armstrong · 2019-12 · Stack Overflow · on “Installing Python 3 and Alias it on a Mac”
I was installing python 3 and following this video here on how to do it. video [this video] At 4:15 the video says type nano ~/.bash_profile Then alias python3 as python below the declaration of PATH. I did that as follows: alias python=python3 Exactly like in the video. Then I went to check what version of python was loaded and I still have version 2.7.16. Secondly, all of my $ are now % and it is quite weird. Did I do something wrong? Output: Jack@Jacks-MBP-2 ~ % python --version Python 2.7.16 Jack@Jacks-MBP-2 ~ % python3 --version Python 3.8.0 Jack@Jacks-MBP-2 ~ % Within ~/.bash_profile # Setting PATH for Python 3.8 # The original version is saved in .bash_profile.pysave PATH="/Library/Framewo
Cites Chris du Plessis · 2020-06 · Stack Overflow · on “What is wrong with this code python classes and objects”
Your code is not good to say the least. PyCharm should tell you if there any problems before it runs. I'm not sure if you are running on a potato that it lags. Here are the mistakes I found: opening balance should be opening_balance indentation errors all class functions should have self as a first argument don't use global to access class variables. Use self. PEP-8 violations that can be corrected with pressing CTRL+ALT+L on your keyboard __str__ should not print. It should rather return an str Edit: classes should follow CamelCaps conventions Not an error but I suggest sticking with either single or double quotes to encapsulate strings. Everyone should at least be consistent with themselve