Creating Your First Python Program


In the last tutorial, we completed our Python installation and setup. It's time to create your first program 









Creating First Program

Step 1) In Aptana Studio write the command
print("Hello World")
Creating Your First Python Program
Step 2) Save the file as HelloWord.py in folder "Guru99."
  1. Select the folder "Guru99" where you want to save the .py file
  2. File saved with title "HelloWorld.py". Make sure you add .py extension to each and every file
Creating Your First Python Program
When you save the file, it will automatically show in your Aptana Studio Project Explorer
Creating Your First Python Program
Step 3) Execute the code using the following steps
  1. Right click on the file that you want to run your code
  2. Click on the green run button on top of the main menu and select "Run As"
  3. Click on Python Run
Creating Your First Python Program
Step 4) The output "Hello World" of the code is seen in the console
Creating Your First Python Program
Step 5) Don't worry if you don't have Aptana Studio or an editor installed, you can still run the code from the command prompt.
Creating Your First Python Program
The output of the code would be
Creating Your First Python Program

Comments

Popular posts from this blog

Introduction to BIG DATA: Types, Characteristics & Benefits

Learn Python Main Function with Examples: Understand __main__

Hadoop Tutorial: Features, Components, Cluster & Topology