How to start first program with Python in Window

in #hive4 years ago

python.jpg

Hello everyone my name is Robert chain to day we will learn how to create simply program in Python. In this series i will use SublimeText3 to code. SublimeText is one of best IDE(Integrated development environment) for newpie.

Screenshot%20(507).png

Download Sublime text 3.

If you never used Python before you have to set environment variables.

Step 1: reach this link to install Python.
image.png

click Download and download newest version of Python.
image.png

Step 2: Open the install. Choose all and push upgrade now. if you could not see upgrade button choose install now because i had installed before so that the upgrade button shows up.
Screenshot%20(511).png

Wait a minutes.
Screenshot%20(512).png

Okay we done. you can check Python has been installed or not by following.

  • push window button on your keyboard + R.
    image.png

  • If you see run board type cmd and Enter.

  • Type Python and your Python version will be showed.
    image.png

  • Today is June/14/2020 and the newest version is 3.8.3. Okay we have done reach to the next step.

Step 3: Open SublimeText 3 Ctrl + S and fill your project name. example my project name is test.py remember '.py' at tail then Enter.
image.png

If you .py at tail but your project still a text file click to save as type bar then scroll down and choose .py blabla about Python and then Enter.
image.png

Okay comeback with SublimeText 3 Ctrl + o and open your file then click open. Let try legend program.
image.png

This is Hello World program in Python. In Python we have not to use semicolon at the end of sentence. Then Ctrl + S to save it again. I don't care another IDE but if you use SublimeText you have to save it before run your program. After saved open your cmd Window + R type cmd then Enter. Because i save my program at desktop so that i access to desktop, you also read how to move to another folder with cmd.
image.png

This is syntax :
python + space + projectname.py then Enter.
image.png

Success. Our program run and print Hello World to cmd.
image.png

Congratulation, we finished our mision: How to start with Python in Window 10. Thank for your reading.

Remember, practice, challenge and not afraid of difficulties. If you have any question put it here i will reply it as soon as i can.