To run this, install Python using the following instructions:
- First, visit https://www.python.org/downloads/release/python-3105/ in a web browser.
- Scroll down to the "Files" header on the bottom of the page. Download the macOS 64-bit universal2 installer.
- Find where you downloaded the file, which will be called python-3.10.5-macos11.pkg or python-3.10.5-macosx10.9.pkg. Double-click it to launch it.
- Click Continue 2 times, read the license agreement and press Continue again.
- Click Agree in the pop up window. Then click Install. If prompted, allow installer to access files.
- Wait until you see "The installation was completed successfully". Then close the window.
- Press Command–Space to show the Spotlight, and type idle. Click on it to open. You should see a Python window pop up. This is the Python console, an - interactive program that lets you run simple Python code. Try typing in 2 + 3 and pressing Enter. You should see the number 5 printed! You can close this window or type in exit() and press Enter to quit.
- Now that Python is installed, you'll install PyCharm, a powerful tool for writing Python programs. Here is a helpful step-by-step breakdown of PyCharm installation: https://www.jetbrains.com/help/pycharm/installation-guide.html#f1b17fe3
- Afterwards, follow the instructions on this website (https://www.jetbrains.com/help/pycharm/creating-and-running-your-first-python-project.html#creating-simple-project) to create a project file. Then, copy this source code to the file to run it.