Skip to main content

The Python Interpreter पायथन इंटरप्रेटर

The Python interpreter is a program that executes Python code. It reads and interprets Python scripts or interactive commands, converting them into machine-readable bytecode for the computer to execute.The interpreter is a crucial component for running Python code, facilitating both learning and development processes. Users can interact with the interpreter in two primary modes:
पायथन इंटरप्रेटर एक प्रोग्राम है जो पायथन कोड को निष्पादित करता है। यह पायथन स्क्रिप्ट या इंटरैक्टिव कमांड को पढ़ता है और व्याख्या करता है, उन्हें कंप्यूटर द्वारा निष्पादित करने के लिए मशीन-पठनीय बाइटकोड में परिवर्तित करता है। दुभाषिया पायथन कोड चलाने के लिए एक महत्वपूर्ण घटक है, जो सीखने और विकास दोनों प्रक्रियाओं को सुविधाजनक बनाता है। उपयोगकर्ता इंटरप्रेटर के साथ दो प्राथमिक मोड में बातचीत कर सकते हैं:-

1. Interactive Mode:- In this mode we can launch the Python interpreter in our terminal or command prompt without specifying a script.This mode allows us to enter Python commands and see immediate results.To access the Python interpreter in interactive mode, open a terminal and type `python` or `python3` (depending on your installation). 

1. इंटरएक्टिव मोड: - इस मोड में हम स्क्रिप्ट निर्दिष्ट किए बिना अपने टर्मिनल या कमांड प्रॉम्प्ट में पायथन इंटरप्रेटर लॉन्च कर सकते हैं। यह मोड हमें पायथन कमांड दर्ज करने और तत्काल परिणाम देखने की अनुमति देता है। इंटरैक्टिव मोड में पायथन इंटरप्रेटर तक पहुंचने के लिए, एक खोलें टर्मिनल और टाइप करें `पाइथन` या `पाइथन3` (आपके इंस्टॉलेशन के आधार पर)।
>>>2+5
7
>>> 4**2
16
>>>

2. Script Mode:- In this mode we can create Python scripts with a ".py" file extension containing a sequence of Python commands and Execute the script by running the Python interpreter followed by the script's filename. For script mode, create a Python script using a text editor, and then run it with the python script.py command. We can also use short cut key (F5) to run Python Script.
2. स्क्रिप्ट मोड: - इस मोड में हम ".py" फ़ाइल एक्सटेंशन के साथ पायथन स्क्रिप्ट बना सकते हैं जिसमें पायथन कमांड का अनुक्रम होता है और स्क्रिप्ट के फ़ाइल नाम के बाद पायथन इंटरप्रेटर चलाकर स्क्रिप्ट को निष्पादित कर सकते हैं। स्क्रिप्ट मोड के लिए, टेक्स्ट एडिटर का उपयोग करके एक पायथन स्क्रिप्ट बनाएं, और फिर इसे पायथन स्क्रिप्ट.py कमांड के साथ चलाएं। Python Script को चलाने के लिए हम शॉर्टकट कुंजी (F5) का भी उपयोग कर सकते हैं।

SumOfTwo.py 

a=int(input("Enter First Number"))
b=int(input("Enter Second Number"))
sum=a+b
print("Sum of",a,"and",b, "is=",sum)




Comments

Popular posts from this blog

Programming with Python Language Tutorial available in hindi and english पाइथन प्रोग्रामिंग टुटोरिअल हिंदी एवं अंग्रेजी भाषा में

 Unit -01 1. Introduction to python (पाइथन भाषा का परिचय) 2. History of Python Programming Language पाइथन प्रोग्रामिंग लैंग्वेज का इतिहास 3. Python Programming Language’s Features and Advantages पायथन प्रोग्रामिंग लैंग्वेज की प्रमुख विशेषताएं 4. Python’s Programming Language's Popularity पाइथन प्रोग्रामिंग लैंग्वेज की लोकप्रियता 5.The Future of Python Programming Language पायथन प्रोग्रामिंग लैंग्वेज का भविष्य 6. The Python Interpreter पायथन इंटरप्रेटर 7. The Python IDLE पाइथन आईडीएलई 8. Installation process of Python IDLE पायथन आईडीएलई की इंस्टालेशन प्रक्रिया 9. Dynamically typed and strongly typed features of python गतिशील रूप से टाइप और दृढ़ता से टाइप की गई भाषा पायथन 10. Basic Data Types of Python पायथन के बेसिक डेटा टाइप 11. Variables in python पायथन में वेरिएबल 12. Expressions in Python पायथन में अभिव्यक्तियां 13. Statements in Python पायथन में कथन 14. Operator's in Python पायथन में ऑपरेटर्स 15. Flow of execution of a python program पाइथन प्रोग्राम के निष्पादन का प्रवाह 16...

Inbuilt Functions in Python पाइथन में अंतर्निहित फ़ंक्शन्स

Python is a powerful programming language that provides many inbuilt functions to make coding simple and efficient. These functions help programmers perform common tasks like finding length, converting characters, or checking memory addresses without writing extra code. पायथन एक शक्तिशाली प्रोग्रामिंग भाषा है जो कई अंतर्निहित (inbuilt) फ़ंक्शन्स प्रदान करती है, जिससे कोडिंग आसान और प्रभावी हो जाती है। ये फ़ंक्शन प्रोग्रामर को सामान्य कार्य करने में मदद करते हैं जैसे लंबाई निकालना, अक्षरों का रूपांतरण करना या मेमोरी एड्रेस जांचना, और इसके लिए अतिरिक्त कोड लिखने की आवश्यकता नहीं होती। (a)  id()  – Unique Identifier of an Object  किसी वस्तु का अद्वितीय पहचानकर्ता The  id()  function returns the unique memory address of an object. Every variable or object in Python is stored in memory, and  id()  helps us know where exactly it is stored. id()  फ़ंक्शन किसी ऑब्जेक्ट का अद्वितीय मेमोरी एड्रेस लौटाता है। पायथन में हर वेरिएबल या ऑब्जेक्ट मेमोरी में संग्रह...

Conditional statements in Python if, if-else, if-elif-else पायथन में सशर्त कथन

  In Python, conditional statements help you make decisions in the code. There are three main types of conditionals:- पायथन में, सशर्त कथन आपको कोड में निर्णय लेने में मदद करते हैं। सशर्त के तीन मुख्य प्रकार हैं:-  1.) Conditional `if` statement:- An `if` statement executes the code block only if the condition evaluates to `True`. 1.) सशर्त `if` कथन:- एक `if` स्टेटमेंट कोड ब्लॉक को केवल तभी निष्पादित करता है जब स्थिति सही पर मूल्यांकन करती है। Syntax:- if condition:    Statement(s) Example:- x = 10 if x > 5:     print("x is greater than 5") 2.) Alternative `if-else` statement:  An `if-else` statement checks a condition and executes a block of code('if' block), if the condition is true otherwise provides an alternative block of code ('else' block), if the condition is false. 2.) वैकल्पिक `if- else` कथन:- एक `if-else` स्टेटमेंट एक शर्त की जाँच करता है और कोड के एक ब्लॉक ('if' ब्लॉक) को निष्पादित करता है, यदि स्थिति सही है अन्यथा कोड का एक वैकल्पिक ब्ल...