Important Notice:

Accepting Input from Console

Accepting Input from Console

2 views 2 min read

Accepting Input from Console (input()) (कंसोल से इनपुट प्राप्त करना) :-

किसी भी Computer Program का मुख्य कार्य Input (इनपुट) प्राप्त करना, उस पर Processing (प्रसंस्करण) करना और Output (आउटपुट) प्रदर्शित करना होता है।

Input (इनपुट) वह Data या जानकारी होती है जो User (उपयोगकर्ता) Program को देता है। Python में User से Keyboard (Console) के माध्यम से Input प्राप्त करने के लिए input() Function का उपयोग किया जाता है।

जब Program input() Function तक पहुँचता है, तो Program रुक जाता है और User द्वारा Data दर्ज करने का इंतजार करता है। जैसे ही User Enter Key दबाता है, Program उस Input को स्वीकार करके आगे Execute (निष्पादित) करता है।

महत्वपूर्ण: input() Function हमेशा String (str) Data Type Return करता है, चाहे User Number ही क्यों न दर्ज करे।

English

The main task of any computer program is to accept input, process the data, and display output.

Input is the data or information provided by the user to the program. In Python, the input() function is used to accept input from the keyboard (console).

When the program reaches the input() function, it pauses and waits for the user to enter data. After the user presses the Enter key, the program accepts the input and continues execution.

Important: The input() function always returns a String (str), even if the user enters a number.

What is Console? (कंसोल क्या है?) :-

Console वह Window होती है जहाँ Python Program चलता है। इसी Window में User Keyboard से Input देता है और Program का Output दिखाई देता है।

Console के उदाहरण:

  • Command Prompt (CMD)
  • PowerShell
  • Python IDLE Shell
  • VS Code Terminal
  • PyCharm Console

English

A Console is the window where a Python program runs. The user enters data through the keyboard, and the program displays the output.

Examples of Console:

  • Command Prompt (CMD)
  • PowerShell
  • Python IDLE Shell
  • VS Code Terminal
  • PyCharm Console

Related Notes