In this Python establishment guid, you’ll see well ordered how to set up a functioning Python 3 circulation on Windows, macOS, Linux, iOS. So how about we begin!
First, check whether Python is pre-installed on your operating system. Open command prompt by entering a command on you search box of the start menu. In the command terminal window write python in lowercase and press enter. If you get >>> than it means that Python is installed in your system. And if you get an error message telling you that ‘python’ is not recognized as an internal or external command, operable program or batch file. Then it means that python is not installed on your system. In that case, download a Python Installer for Windows, Go to http://python.org/downloads/. You should see two buttons, one for downloading Python 3 and one for downloading Python 2. Click the Python 3 button, which should automatically start downloading the correct installer for your system. After you’ve downloaded the file, run the installer. Make sure you check the option Add Python to PATH, which will make it easier to configure your system correctly. As shown in the below Figure 1:
Figure 1: make sure you check to Add Python 3.6 to the path
After installing python search for IDLE all in uppercase on search box of start menu. Python shell window will open similar to the figure 1.2 as shown below:
If you want to run a single line of code then you can directly run that code in your python shell, just write the code and press enter, output will be displayed just below the code written by you, as shown in the Figure 1.3:
Since as a programmer you cannot do well with just a single line of code, In the programming world you will always have to write 100s of 100 line of codes to do this task effectively there are different popular software available(like Jupyter Notebook, pycharm, Atom…) but you can also write bunch of codes on python IDLE, to do this just follow me, click on the File in the toolbar of Python Shell and then click on the new file a new window, write your code in this window and save this file and then to run this file and generate output click F5 or click on the run in the toolbar and then click on Run Module, the output will be displayed on the python shell, as shown in the below figure 1.4:
Nowaday’s The most popular place of writing and running python code is Jupyter Notebook, Jupyter notebook is so popular because of its simplicity to code and also due to its user friendly simple interface. In this book I have used jupyter notebook for showing different example to you. Let’s start and learn how to work with jupyter notebook, First install python as done above, because jupyter notebook is different for different programming language. So first install python and then to install Jupyter Notebook , type cmd in the search box of start menu, Command Prompt window will open as shown in the Figure 1.5, in this window use cd.. command to change directory to the location to which python is installed , in my case python is installed at location C:\Users\anand as you see in the below figure 1.5, now type pip install jupyter or pip3 install jupyter and press enter to install jupyter to python, wait for a while and finally you are ready to code on jupyter notebook .
After installation is done close command prompt window and again open new command prompt wind as you have done earlier. And type jupyter notebook all in lower case and press enter see below figure 1.6:
When you type jupyter notebook and press enter an localhost on your browser will automatically open as shown in the below figure 1.7 this is your jupyter notebook.
Create a new python file by clicking on new as show above and start coding as shown n the below figure 1.8. throughout the book we are using jupyter notebook.