उदाहरण
Python की दो लाइनों में गलती ढूंढें
छूटे हुए कोलन वाला for लूप: गलती ढूंढी गई, Python कुछ भी प्रिंट करने से पहले क्यों रुक जाता है, फिर सुधरी हुई लाइन।
- 0:45
- कोड के सवाल
- Erinome की आवाज़ में
- अंग्रेज़ी
प्रॉम्प्ट से बना
Find the error:
for i in range(5)
print(i) वीडियो की ट्रांसक्रिप्ट
In this video, we find and fix a Python syntax error.
Question one. Find the error: The first line reads for i in range, with five in parentheses. The indented second line reads print, with i in parentheses.
Notice that line one is missing a colon after the closing parenthesis. Python requires a colon at the end of a for loop header. Without it, Python raises a SyntaxError before either line executes, so nothing is printed.
The indentation of print is correct and does not need changing. Hence, the corrected first line is for i in range, open parenthesis, five, close parenthesis, colon.
और उदाहरण
-
न्यूरल नेटवर्क कैसे सीखता है बिल्लियों को पहचानना सीखता एक नेटवर्क: एक अंदाज़ा, उसे मिली गलती और एक छोटा सुधार, बार-बार, बिना एक भी समीकरण के। 1:25 · अंग्रेज़ी -
चांद का आकार बदलता हुआ क्यों लगता है NASA Space Place के एक आर्टिकल से लिखा गया: चाँद का वह आधा हिस्सा जिसे सूरज हमेशा रोशन रखता है, और आठों कलाएँ क्रम से। 0:59 · अंग्रेज़ी -
अरबी क्विज़ में x का मान निकालना अरबी अंकों में एक बहुविकल्पीय सवाल, तराज़ू की मदद से दाएं से बाएं हल किया गया, सारे विकल्प बोर्ड पर और सही जवाब हरे घेरे में। 1:07 · अरबी
आपका टॉपिक, करीब एक मिनट में बनकर तैयार।
आपके पहले 2 वीडियो फ़्री हैं, हर वीडियो 1 मिनट तक का, वॉटरमार्क के साथ। कार्ड की ज़रूरत नहीं। पूरा प्रोडक्ट, हर आवाज़ और हर स्टाइल समेत।