Welcome to the HelloWorld Python Example repository! This project contains a basic Python script designed to demonstrate fundamental Python syntax by printing a simple message to the console. This example is perfect for beginner Python programmers.
خوش آمدید به مخزن HelloWorld Python Example! این پروژه شامل یک اسکریپت ساده پایتون است که برای نمایش ساختار اولیه زبان پایتون طراحی شده است و پیغام سادهای را به کنسول چاپ میکند. این مثال برای مبتدیان پایتون مناسب است و به عنوان یک راهنمای مقدماتی برای برنامهنویسی با پایتون عمل میکند.
Welcome to the HelloWorld Python Example repository! This project contains a basic Python script designed to demonstrate fundamental Python syntax by printing a simple message to the console. This example is perfect for beginner Python programmers and serves as an introductory tutorial to Python programming.
HelloWorld.py
: A minimal Python script that outputs the message "Hello, World!" to the console.
To run the HelloWorld.py
script, follow the instructions below for different environments.
-
Open Command Prompt:
- Press
Win + R
, typecmd
, and press Enter.
- Press
-
Navigate to the Directory:
- Use the
cd
command to change to the directory containingHelloWorld.py
. For example:cd path\to\your\python-repository\HelloWorld
- Use the
-
Run the Script:
- Execute the script using Python:
python HelloWorld.py
- Ensure Python is installed and added to your system's PATH.
- Execute the script using Python:
-
Open Terminal:
- Find Terminal in your Applications folder (macOS) or search for it (Linux).
-
Navigate to the Directory:
- Use the
cd
command to change to the directory containingHelloWorld.py
. For example:cd path/to/your/python-repository/HelloWorld
- Use the
-
Run the Script:
- Execute the script using Python:
python3 HelloWorld.py
- Ensure Python 3 is installed and accessible from your PATH.
- Execute the script using Python:
-
Open PyCharm:
- Launch the PyCharm IDE.
-
Open the Project:
- Go to
File
>Open
and select theHelloWorld
directory.
- Go to
-
Locate the Script:
- In the Project Explorer pane on the left, find and click on
HelloWorld.py
.
- In the Project Explorer pane on the left, find and click on
-
Run the Script:
- Right-click on
HelloWorld.py
and selectRun 'HelloWorld'
. - The output will appear in the Run tool window at the bottom.
- Right-click on
-
Open Visual Studio Code:
- Launch VSCode.
-
Open the Folder:
- Go to
File
>Open Folder
and select theHelloWorld
directory.
- Go to
-
Open the Script:
- In the Explorer pane on the left, click on
HelloWorld.py
to open it in the editor.
- In the Explorer pane on the left, click on
-
Run the Script:
- Via Terminal:
- Open a new terminal in VSCode by going to
Terminal
>New Terminal
, then run:python HelloWorld.py
- Open a new terminal in VSCode by going to
- Via Play Button:
- If you have the Python extension installed, you can click the green play button in the top right corner of the editor to run the script.
- Via Terminal:
- Python 3.x: Ensure Python 3.x is installed on your system.
- IDE/Text Editor: PyCharm or VSCode is recommended for a better development experience.
Add relevant topics to help others find this project:
python
beginner
tutorial
example
hello-world
For any questions or feedback, please contact me at hamedgharghi1@gmail.com.
خوش آمدید به مخزن HelloWorld Python Example! این پروژه شامل یک اسکریپت ساده پایتون است که برای نمایش ساختار اولیه زبان پایتون طراحی شده است و پیغام سادهای را به کنسول چاپ میکند. این مثال برای مبتدیان پایتون مناسب است و به عنوان یک راهنمای مقدماتی برای برنامهنویسی با پایتون عمل میکند.
HelloWorld.py
: یک اسکریپت ساده پایتون که پیغام "Hello, World!" را به کنسول چاپ میکند.
برای اجرای اسکریپت HelloWorld.py
، مراحل زیر را برای محیطهای مختلف دنبال کنید.
-
باز کردن Command Prompt:
- کلیدهای
Win + R
را فشار دهید،cmd
را تایپ کنید و Enter را بزنید.
- کلیدهای
-
رفتن به دایرکتوری:
- از دستور
cd
برای تغییر به دایرکتوری حاویHelloWorld.py
استفاده کنید. برای مثال:cd path\to\your\python-repository\HelloWorld
- از دستور
-
اجرای اسکریپت:
- اسکریپت را با استفاده از Python اجرا کنید:
python HelloWorld.py
- اطمینان حاصل کنید که Python نصب شده و به PATH سیستم شما اضافه شده است.
- اسکریپت را با استفاده از Python اجرا کنید:
-
باز کردن Terminal:
- Terminal را در پوشه Applications (macOS) پیدا کنید یا جستجو کنید (Linux).
-
رفتن به دایرکتوری:
- از دستور
cd
برای تغییر به دایرکتوری حاویHelloWorld.py
استفاده کنید. برای مثال:cd path/to/your/python-repository/HelloWorld
- از دستور
-
اجرای اسکریپت:
- اسکریپت را با استفاده از Python اجرا کنید:
python3 HelloWorld.py
- اطمینان حاصل کنید که Python 3 نصب شده و از PATH شما قابل دسترسی است.
- اسکریپت را با استفاده از Python اجرا کنید:
-
باز کردن PyCharm:
- IDE PyCharm را راهاندازی کنید.
-
باز کردن پروژه:
- به
File
>Open
بروید و دایرکتوریHelloWorld
را انتخاب کنید.
- به
-
یافتن اسکریپت:
- در پنل Project Explorer در سمت چپ، روی
HelloWorld.py
کلیک کنید.
- در پنل Project Explorer در سمت چپ، روی
-
اجرای اسکریپت:
- روی
HelloWorld.py
کلیک راست کرده و گزینهRun 'HelloWorld'
را انتخاب کنید. - خروجی در پنجره Run در پایین ظاهر خواهد شد.
- روی
-
باز کردن Visual Studio Code:
- VSCode را راهاندازی کنید.
-
باز کردن پوشه:
- به
File
>Open Folder
بروید و دایرکتوریHelloWorld
را انتخاب کنید.
- به
-
باز کردن اسکریپت:
- در پنل Explorer در سمت چپ، روی
HelloWorld.py
کلیک کنید تا در ویرایشگر باز شود.
- در پنل Explorer در سمت چپ، روی
-
اجرای اسکریپت:
- از طریق Terminal:
- یک ترمینال جدید در VSCode باز کنید با رفتن به
Terminal
>New Terminal
و سپس اجرا کنید:python HelloWorld.py
- یک ترمینال جدید در VSCode باز کنید با رفتن به
- از طریق دکمه Play:
- اگر افزونه Python را نصب کردهاید، میتوانید روی دکمه سبز Play در گوشه بالا سمت راست ویرایشگر کلیک کنید تا اسکریپت را اجرا کنید.
- از طریق Terminal:
- Python 3.x: اطمینان حاصل کنید که Python 3.x روی سیستم شما نصب شده است.
- IDE/ویرایشگر متنی: PyCharm یا VSCode برای تجربه بهتر توسعه توصیه میشود.
برچسبهای مربوطه را اضافه کنید تا به دیگران کمک کند این پروژه را پیدا کنند:
python
beginner
tutorial
example
hello-world
برای هرگونه سوال یا بازخورد، لطفاً با من تماس بگیرید به hamedgharghi1@gmail.com.