-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the SOSPython wiki!
Get the latest version of Python from https://www.python.org/downloads/
Click on "Download Python" button and download installer
Windows installer will download python-x.x.x.exe. You need to run this .exe to install python.
When you run .exe then it will lunch pop screen and ask from Install Launcher and Add Path. Select both options and click on the Install Now link.
Once Python is installed then you can verify its installation by checking python version from a command prompt by executing the following command:
python --version
It will show you output as version x.x.x.
There are many Python editors available online such as Atom, Spyder, Thonny, Sublime Text3, etc. you can use any of them but I found visual studio code editor is most user-friendly that is used in this tutorial.
Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other languages.
You can download Visual Studio Code from visual studio official website by clicking on this link - https://code.visualstudio.com/docs
Let us see how you can make and run your first Python program using Notepad and command prompt:
- Create a folder called test at
c:drive. - Go to c:\test folder using >
cd c:\test command. - Create a file
Hello.pyusing any text editor like Notepad. - Extension of the file must be
.py - Type print statement in this file:
print("Hello Python")- Save the file in
c:\test folder. - Run your program using the following command
- c:\test>
python Hello.py - It will print
"Hello Python"at the command prompt. - If you are able to see
"Hello Python"at the command prompt then congratulations, you have run your first Python program.