Python - First Program

Here are the steps to execute your first Python program

  • Open a text editor like Notepad or Sublime Text.
  • Type the following code in the editor:
print("Hi, Welcome to Evidhya")
  • Save the file with a .py extension, for example, hello.py.
  • Open the terminal or command prompt in your system.
  • Navigate to the directory where your hello.py file is saved using the cd command. For example, if your file is saved on the desktop, use the command cd Desktop to navigate to the desktop directory.
  • Type the command python hello.py in the terminal and press Enter.
  • The output "Hi, Welcome to Evidhya" will be displayed on the terminal.

Congratulations, you have executed your first Python program!