Getting set up with Python!
The first step is to go to python.org and go to the download section. Once downloaded and installed, how do I run a script and see it working? What I decided to do was open up vscode, which can be found at https://code.visualstudio.com/ and open up the terminal which is included. I am on a Mac so if I type in python in my terminal it will show an earlier version of python that I have installed. In order to show the current version I have, I have to type in python3. I can now type in certain commands like 2+2 and have the terminal output 4, but what if I want to learn variables and functions in python?
I first want to create a folder on my desktop called hello_world and then open that folder within vscode. In order to make a python file it has to have .py at the end of the file name. In this case I will create a file called main.py. In this file I will try to create my first python script and see what happens. In order to have a simple line of text print out I have to write the following code:
Now to run this script all I have to do is simply put python3 main.py in the terminal and there it is! This is a simple step in my journey with Python. I will now be moving into data types, operators, variables and much more!