Python Basic Program Structure Top 10 MCQ

1. Python प्रोग्राम का मूल स्ट्रक्चर किस पर आधारित होता है?
The basic structure of a Python program is based on:
a) Brackets
b) Curly braces
c) Indentation
d) Semicolon
उत्तर / Answer: c) Indentation
________________________________________
2. Python प्रोग्राम में एक लाइन में comment कैसे लिखा जाता है?
How do you write a comment in a single line in Python?
a) //
b) <!– –>
c) /* */
d) #
उत्तर / Answer: d) #
________________________________________
3. Python में कोड के ब्लॉक्स को कैसे परिभाषित किया जाता है?
How are blocks of code defined in Python?
a) Curly braces {}
b) Round brackets ()
c) Using semicolons
d) Indentation (space or tab)
उत्तर / Answer: d) Indentation (space or tab)
________________________________________
4. Python में User से Value लेने के लिए कौन क्या उपयोग किया जाता है?
What is commonly used to Take input from user in Python?
a) input()
b) main()
c) start()
d) import main
उत्तर / Answer: a) input()
________________________________________
5. Python प्रोग्राम की execution कहाँ से शुरू होती है?
From where does the execution of a Python program begin?
a) किसी भी function से
b) start से
c) सबसे पहली लाइन से
d) main() function से
उत्तर / Answer: c) सबसे पहली लाइन से
________________________________________
6. Python प्रोग्राम में modules को include करने के लिए क्या प्रयोग होता है?
What is used to include modules in a Python program?
a) #include
b) use
c) import
d) define
उत्तर / Answer: c) import
________________________________________
7. Python में multiple statements को एक ही लाइन में लिखने के लिए किसका प्रयोग किया जाता है?
What is used to write multiple statements in one line in Python?
a) , (comma)
b) : (colon)
c) ; (semicolon)
d) # (hash)
उत्तर / Answer: c) ; (semicolon)
________________________________________
8. निम्नलिखित में से कौन-सा valid Python statement है?
Which of the following is a valid Python statement?
a) print “Hello”
b) echo “Hello”
c) printf(“Hello”)
d) print(“Hello”)
उत्तर / Answer: d) print(“Hello”)
________________________________________
9. Python में indentation error कब आता है?
When does an indentation error occur in Python?
a) जब कोड को अधिक कमेंट किया जाए
b) जब print() में सिंटैक्स ग़लत हो
c) जब लाइन को सही तरीके से space या tab से indent न किया जाए
d) जब import ग़लत हो
उत्तर / Answer: c) जब लाइन को सही तरीके से space या tab से indent न किया जाए
________________________________________
10. निम्न में से कौन-सा हिस्सा Python प्रोग्राम structure में शामिल नहीं है?
Which of the following is NOT a part of Python’s basic program structure?
a) Comments
b) Indentation
c) Header files
d) Functions
उत्तर / Answer: c) Header files