Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Industrial programming >> Python

Hello World: Building Your First Python Application

After completing the installation and configuration of Python in the previous tutorial, you’re ready to write and run your first script.

Creating Your First Python Program

  1. Open PyCharm. Launch the IDE and click Create New Project on the welcome screen.
  2. Choose a project location. Keep the default folder or select a custom path. Rename the default "untitled" project to something meaningful, such as "FirstProject". PyCharm will automatically detect the Python interpreter you installed. Click Create to finish the setup.
  3. Create a Python file. From the menu bar, choose File > New > Python File and give it a name, e.g., HelloWorld.
  4. Write your code. Inside the new file, type the following line:
    print("Hello World!")
  5. Run the script. Click Run > Run... or press Shift+F10. The output will appear in the Run panel at the bottom of the window.
  6. Verify the output. You should see the text Hello World! displayed.
  7. Alternate method: command line. If you prefer or don’t have PyCharm, open a terminal, navigate to the folder containing HelloWorld.py, and execute:
    python HelloWorld.py
    You’ll see the same output in the console.
  8. Online editor option. For quick testing without installing anything, use an online Python editor. Paste the same line of code and run it. The result will appear instantly.

Whether you’re using PyCharm, the command line, or an online sandbox, you’ve successfully written and executed your first Python program. Congratulations!

Python

  1. Building Your First FPGA: LED Blink Tutorial (VHDL & Verilog)
  2. C# Hello World – Building Your First C# Application
  3. Java Hello World: Your First Program
  4. Your First VHDL Program: A Step‑by‑Step Hello World Tutorial
  5. C++ Hello World Tutorial: Step‑by‑Step Code, Setup & Explanation
  6. C# Hello World: Building Your First Console Application
  7. C Hello World: Your First Program – A Step‑by‑Step Guide
  8. Java Hello World: Step‑by‑Step Guide to Writing Your First Java Program
  9. Python Queue: Understanding FIFO & LIFO with Practical Examples
  10. Beginner’s Guide to Verilog: Hello World Example