Why Python language
There are many good reasons to choose Python as your Primary programming language.
पायथन को अपनी प्राथमिक प्रोग्रामिंग भाषा के रूप में चुनने के कई अच्छे कारण हैं।
First of all, Python is an easy to learn, powerful programming language.
पायथन सीखना आसान है, शक्तिशाली प्रोग्रामिंग भाषा है।
-
Python has clean syntax and code readability. Doesn’t require any programming knowledge.
पायथन में साफ सिन्टैक्स और कोड पठनीयता है। किसी भी प्रोग्रामिंग ज्ञान की आवश्यकता नहीं है।
Python is portable and extensible programming language.
पायथन पोर्टेबल और एक्स्टेंसिबल प्रोग्रामिंग भाषा है।
-
Python is an interpreter, object-oriented, high level programming language with dynamic semantics.
-
पायथन एक व्याख्यात्मक, ऑब्जेक्ट ओरियेंटेड, हाई लेवल प्रोग्रामिंग भाषा है जिसमें डॉयनेमिक शब्दार्थ है।
-
Python is light weight programming language as it requires less memory because it converts source code into machine code line by line thus memory required is less.
पायथन लाइट वेट वाली प्रोग्रामिंग भाषा है क्योंकि इसमें कम मेमोरी की आवश्यकता होती है क्योंकि यह सोर्स कोड को मशीन कोड लाइन में लाइन द्वारा परिवर्तित करती है जिससे मेमोरी की आवश्यकता कम होती है।
-
Python is dynamically typed and garbage collected. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming.
पायथन डॉयनेमिक रूप से टाइप किया जाता है और गारबेज कलेक्ट किया जाता है। यह प्रक्रियात्मक, ऑब्जेक्ट-ओरियेंटेड और फंक्शनल प्रोग्रामिंग सहित कई प्रोग्रामिंग प्रतिमानों का समर्थन करता है।
-
Python is often described as a “batteries included” language due to its comprehensive standard library.
-
पायथन को अक्सर इसकी व्यापक स्टैण्डर्ड लाइब्रेरी के कारण “बैटरी शामिल” भाषा के रूप में वर्णित किया जाता है।
Python is very fast. The source code is compiled into byte-code, so that executing the same file will be faster, if the script will be executed again.
पायथन बहुत तेज है। सोर्स कोड को बाइट-कोड में संकलित किया गया है, ताकि उसी फाइल को निष्पादित करना तेज हो, यदि स्क्रिप्ट फिर से निष्पादित की जाएगी।
Python Versions | Date |
Python 0.9.0 | Feb 20th, 1991 |
Python 0.9.1 | February, 1991 |
Python 0.9.2 | August, 1991 |
Python 0.9.4 | December 24, 1991 |
Python 0.9.5 | January 2, 1992 |
Python 0.9.6 | April 6, 1992 |
Python 0.9.8 | January 9, 1993 |
Python 0.9.9 | July 29, 1993 |
Python 1.0 | Jan 1994 |
Python 1.2 | April 10, 1995 |
Python 1.3 | October 12, 1995 |
Python 1.4 | October 25, 1996 |
Python 1.5 | December 31, 1997 |
Python 1.6 | September 5, 2000 |
Python 2.0 | October 16, 2000 (PY2K) |
Python 2.1 | April 15, 2001 |
Python 2.2 | December 21, 2001 |
Python 2.3 | July 29, 2003 |
Python 2.4 | November 30, 2004 |
Python 2.5 | September 19, 2006 |
Python 2.6 | October 1, 2008 |
Python 2.7 | July 3, 2010 |
Python 3.0 | December, 3, 2008 (PY3K |
Python 3.1 | June 27, 2009 |
Python 3.2 | February 20, 2011 |
Python 3.3 | September 29, 2012 |
Python 3.4 | March 16, 2014 |
Python 3.5 | September 13, 2015 |
Python 3.6 | December 23, 2016 |
Python 3.7 | June 27, 2018 |
Python 3.8 | 2019 |
Python is 3.8.2 | Current Version of Python |
Python Interpreter- पायथन इंटरप्रेटर
Python can be programmed using the interactive command line (or IDE) but your code won’t be saved. Once you close the session it all goes away.
इंटरैक्टिव कमांड लाइन (या IDE) का उपयोग करके पायथन को प्रोग्राम किया जा सकता है, लेकिन आपका कोड सेव नहीं किया जाएगा। एक बार जब आप सेशन को बंद कर देते हैं तो यह सब चला जाता है।
To save your program: – प्रोग्राम को सेव करने के लिए
Step 1: Type your commands in a text file
एक टेक्स्ट फाइल में अपने कमांड टाइप करें।
Step 2: Save it with *.py extension. (For example saved ‘pyRoot.py’)
*.py एक्सटेंशन के साथ इसे सेव करें।
To use the interpreter: – इंटरप्रेटर का उपयोग करने के लिए
Step 1: Open your command prompt. – अपने कमांड प्रॉम्प्ट ओपेन करें।
Step 2: Type “python or py” at the command prompt launch the Python IDE.
Python IDE को लांच करने के लिए कमांड प्रॉम्प्ट पर “python or py” टाइप करें।
In the Interactive mode the ‘print’ is not necessary.
इंटरएक्टिव मोड में प्रिंट’ आवश्यक नहीं है।
>>> "Hello Python" 'Hello Python' >>>3 3
Start the IDLE follow the below steps:
IDLE प्रारंभ करने के लिए नीचे दिए गए चरणों का पालन करें:
On Windows 7 and earlier versions – विंडोज 7 और पहले के वर्जन पर
Step 1: This is usually found in the Start→ Programs menu
यह आमतौर पर स्टार्ट →प्रोग्राम्स मेनू में पायाजाता है।
Step 2: or you can run it by typing IDLE in the Start-Run… dialog box
या आप इसे स्टार्ट →रन… डायलॉग बॉक्स में IDLE लिखकर चला सकते हैं।
On Windows 8 or 10 – विंडोज 8 या 10 में
Step 1: By typing IDLE in the input field of the Search and then click on IDLE app.
सर्च के इनपुट फील्ड में IDLE टाइप करके और उसके बाद IDLE app पर क्लिक करें।
Step 2:
The Python shell window that opens initially is the main window, which runs an interactive session (notice the >>> prompt).
शुरूआत में ओपेन हुआ पायथन सेल विंडो मुख्य विंडो है, जो इंटरैक्टिव सेशन रन करता है (notice the >>> prompt) ।
IDLE uses menus with keyboard shortcuts for most of its operations. To make a new file, use
File–New, open a new text edit window where you can type, save and run your file’s code.
IDLE अपने अधिकांश कार्यों के लिए कीबोर्ड शॉर्टकट के साथ मेनू का उपयोग करता है। एक नई फाइल बनाने के लिए, File-New का उपयोग करें, एक नई टेक्स्ट एडिट विंडो ओपेन करें, जहाँ आप अपनी फाइल का कोड टाइप, सेव और रन कर सकते हैं।
Use File-Save with File name hello.py
File→Saveका उपयोग hello.py फाइल नाम के साथ करें।
Use File-Open… instead to open a new text edit window displaying an existing file’s code to edit and run.
File→Open… का उपयोग करें, एक नया टेक्स्ट एडिट विंडो खोलने के बजाय एक मौजूदा फाइल के कोड को एडिट और रन करने के लिए प्रदर्शित करें।
IDLE uses keywords are one color. This helps give you a better picture of the components in your code.
IDLE कीवर्ड एक रंग का उपयोग करता है। यह आपको अपने कोड में कंपोनेंट की बेहतर पिक्चर देने में मदद करता है।
To run a file of code, use Run->Run Module or Press shortcut key F5 in text edit window.
Using Comments – कमेंट का उपयोग करना
Comments are a fundamental part of any programming language. Comments are for developers. They describe parts of the code where necessary to assist the understanding of programmers. Using comments within your Python programs helps to make your programs more understandable for humans, including your future self. Including appropriate comments that are relevant and useful can make it easier for others to collaborate with your projects and make the value of your code more understandable.
कमेंट किसी भी प्रोग्रामिंग भाषा का एक मूलभूत हिस्सा है। कमेंट डेवलपर्स के लिए है। वे कोड के कुछ हिस्सों का वर्णन करते हैं जहां प्रोग्रामर की समझ हेतु आवश्यक है। अपने पायथन प्रोग्रामों के भीतर कमेंट का उपयोग करने से आपके प्रोग्रामों को किसी व्यक्ति के लिए और अधिक समझने में मदद मिलती है, जिसमें आपका भविष्य स्वयं भी शामिल है। उपयुक्त कमेंट शामिल करना, जो प्रासंगिक और उपयोगी हों, जिससे दूसरों के लिए आपकी परियोजनाओं के साथ सहयोग करना और आपके कोड के वैल्यू को अधिक समझ में लाया जा सके।
Comment Syntax: Comments in Python begin with a hash mark (#) and white space character and continue to the end of the line.
कमेंट सिन्टैक्सः पायथन में कमेंट एक हैश मार्क (#) और व्हाइट स्पेस कैरेक्टर से शुरू होती हैं और लाईन के अंत तक जारी रहती हैं।
Generally, comments will look something like this:
आमतौर पर, कमेंट कुछ इस तरह से दिखाई देंगे:
# This is a comment
Chapter wise Model Paper Link
- Introduction to Web Design
- Editors
- HTML Basics
- CSS
- CSS Framework
- JavaScript and Angular JS
- Photo Editor
- Web Publishing and Browsing