Hello World Program in Python using IDLE | Python Basics

Hello World Program in Python using IDLE

Let's write your first Python program. The classic first step is printing Hello, World!. We’ll use IDLE, which is the default Python editor.

चलिए अपना पहला Python प्रोग्राम लिखते हैं। सबसे पहले हम Hello, World! को print करेंगे। इसके लिए हम IDLE का उपयोग करेंगे, जो Python के साथ आता है।

Step 1: Open IDLE

Search for IDLE in your Start Menu (Windows) or Applications (Mac). Open it.

Windows में Start Menu या Mac में Applications से IDLE सर्च करें और खोलें।

Open IDLE screenshot

Step 2: Open a New File

Go to File → New File or press Ctrl+N.

File मेनू में जाकर New File पर क्लिक करें या Ctrl+N दबाएँ।

Open new file in IDLE screenshot

Step 3: Write the Code
print("Hello, World!")

This line tells Python to display the message “Hello, World!” on the screen.

यह लाइन Python को "Hello, World!" स्क्रीन पर दिखाने के लिए कहती है।

Step 4: Save the File

Go to File → Save or press Ctrl+S. Save the file as hello.py.

File → Save पर जाएँ या Ctrl+S दबाएँ और फाइल को hello.py नाम से सेव करें।

Step 5: Run the Program

Click on Run → Run Module or press F5. You will see the output below:

Run → Run Module पर क्लिक करें या F5 दबाएँ। नीचे आउटपुट दिखेगा:

Hello, World!
Congratulations!

You've written your first Python program successfully!

आपने सफलतापूर्वक अपना पहला Python प्रोग्राम लिख लिया है!