Python has simpler syntax than other programming languages. Rather than using braces like { and } to mark blocks of code, Python uses indentation. Once you get used to this, things get easier.
The easiest way to run a Python program is to paste it into a website that will run the program for you. One such site is https://repl.it/languages/python3 which you can simply visit, paste or type your program, and click the green Run box to run the program. I would recommend that you copy and paste your programs into simple text files on your computer (created with an editor like notepad) with extension .py and no spaces in the filename. Do not use Word to save program files, it creates "documents" with lots of extra formatting information, and which Python won't read as if it were a program.
It's a very good idea to download and install Python on your own computer so you can build bigger projects and learn how to make them run on your computer. Also, it will help if you install an editor that makes it easy for you edit and save programs, run programs, and use Python's error messages to find where your programs have a mistake that needs to be fixed. One big advantage of using
For now, I would suggest that you install Anaconda and Spyder as a Python editor. Start at this site: https://www.anaconda.com/download/ then choose your platform (Windows, Mac, linux), then Python 3.7 version with the 64-Bit installer. Follow all the recommended settings. It requires 2.8 GB on your hard drive and takes a while to install everything. On Windows, I would suggest that you install Microsoft Visual Studio Code during the installation process. Once it's installed, it will suggest that you look at this page: http://docs.anaconda.com/anaconda/user-guide/getting-started/ I would recommend that you work through that page and write your first program.
Once you have Python installed on your computer, write a program and save it as a file with the extension .py using a text editor. There are several ways to run a program. You can open a command window (on Windows) or a terminal window (Max, linux) and type "python programname.py". Or you can run a program from within the editor. Note that if you double click on a Python program, your computer may think you want it to run the program, so it will open a new window, run the program, and politely clean up after itself by closing the window, making it impossible for you to see what just happened. One way to slow things down is to ask for user input at the end of the program by adding a line such as:
at the end of your program. In Windows, if you right click on a Python program, you can select which program to use to open the file, and you may wish to select a text editor, so that when you double click a Python program, you can edit it.
There are many nice online courses to learn Python. For example, you can sign up for an account at https://repl.it and find a course there called "Auto-Graded Course with Solutions".
One of the hardest things with any programming language is to find and fix "syntax errors" which are places that Python is confused about what you want it to do, because of not following the very particular format that it expects. Most of these come in a few categories:
In Python 2 and some other languages, dividing two integers , like 8/5, gives the result of long division with a remainder, so you would get 8/5 equals 1, and the remainder is 3. If you want to get 8/5 equals 1.6, you need to tell Python 2 to treat 8 or 5 as a decimal number, by typing float(8)/5 or 8/float(5) or 8.0/5, to make one of the numbers a floating point decimal number.