Lesson 4 of 34

input(): उपयोगकर्ता से पूछना

8 min 20 XP

input() वह पढ़ता है जो उपयोगकर्ता टाइप करता है। यहाँ Run दबाने से पहले Input box में मान टाइप करें, हर लाइन में एक।

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

input() हमेशा string देता है। संख्या के रूप में उपयोग करने के लिए int(input()) लिखें।

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

हर input() Input box की अगली लाइन पढ़ता है।

Challenge

+20 XP

input() से दो संख्याएँ पढ़ें और उनका योग print करें। Input box में 5 और 7 हैं, इसलिए उत्तर 12 होना चाहिए।

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.