Python - Chapter 1 MCQ P1
Multiple Choice Questions for Programming Basics
Q1. A program which translates a high-level language program into a machine language program is called:
[translate:Q1. एक प्रोग्राम जो उच्च स्तरीय भाषा (High-level language) के प्रोग्राम को मशीन भाषा में बदलता है, क्या कहलाता है?]
- a) Compiler
- b) Interpreter
- c) Both a and b
- d) None of the above
Answer: a) Compiler
Explanation: A compiler takes the whole program written in easy language and changes it into machine language at once, so computer can understand and run it.
[translate:व्याख्या: कम्पाइलर पूरे प्रोग्राम को एक साथ मशीन भाषा में बदल देता है, जिससे कंप्यूटर उसे समझ सके और चला सके।]
Other options explanation:
- Interpreter: Changes the program line-by-line, not the whole program at once.
[translate:इंटरप्रिटर लाइन-बाय-लाइन बदलता है, एक बार में पूरा प्रोग्राम नहीं।] - Both a and b: Incorrect, because only compiler does complete translation at once.
[translate:दोनों सही नहीं हैं, क्योंकि कम्पाइलर ही पूरा अनुवाद करता है।] - None of the above: Incorrect; compiler is the right answer.
Q2. A sequence of instructions, in a computer language, to get the desired result is known as:
[translate:Q2. कंप्यूटर भाषा में वांछित परिणाम प्राप्त करने के लिए निर्देशों का अनुक्रम क्या कहलाता है?]
- a) Compiler
- b) Interpreters
- c) Both a and b
- d) Program
Answer: d) Program
Explanation: A program is a set of instructions given to a computer to do a specific task or get a result.
[translate:व्याख्या: प्रोग्राम निर्देशों का समूह है जिसे कंप्यूटर को कोई कार्य या परिणाम प्राप्त करने के लिए दिया जाता है।]
Other options explanation:
- Compiler/Interpreter: These are translators, not sets of instructions.
[translate:कम्पाइलर/इंटरप्रिटर अनुवादक होते हैं, निर्देशों का समूह नहीं।] - Both a and b: Incorrect, as explained above.
Q3. A program that converts a high-level language program to a set of instructions that can run on a computer is called:
[translate:Q3. एक प्रोग्राम जो उच्च-स्तरीय भाषा के प्रोग्राम को ऐसे निर्देशों में बदलता है जिन्हें कंप्यूटर चला सकता है, कहलाता है:]
- a) Compiler
- b) Debugger
- c) Editor
- d) None of the above
Answer: a) Compiler
Explanation: Compiler prepares the program for running on a computer by converting it into machine code.
[translate:व्याख्या: कम्पाइलर प्रोग्राम को मशीन कोड में बदलकर कंप्यूटर पर चलाने योग्य बना देता है।]
Other options explanation:
- Debugger: Finds and fixes errors, does not translate programs.
[translate:डिबगर केवल प्रोग्राम में गलती खोजता और ठीक करता है, अनुवाद नहीं करता।] - Editor: Tool for writing or modifying programs, does not convert code.
[translate:एडिटर में प्रोग्राम लिखा या बदला जाता है, कोड में अनुवाद नहीं करता।] - None of the above: Incorrect.
Q4. The name given to a sequence of instructions in a computer language to get the desired result is:
[translate:Q4. कंप्यूटर भाषा में वांछित परिणाम प्राप्त करने के लिए निर्देशों के अनुक्रम को क्या कहा जाता है?]
- a) Program
- b) Algorithm
- c) Pseudocode
- d) Decision table
Answer: a) Program
Explanation: When all instructions are written together for a computer, that whole set is called a program.
[translate:व्याख्या: जब सभी निर्देश एक साथ कंप्यूटर के लिए लिखे जाते हैं, तो उन्हें प्रोग्राम कहा जाता है।]
Other options explanation:
- Algorithm: Step-by-step plan, but not actual computer instructions.
[translate:एल्गोरिदम कदम-दर-कदम योजना है, लेकिन असली कंप्यूटर निर्देश नहीं।] - Pseudocode: Fake code written for planning, not for computer execution.
[translate:स्यूडोकोड योजना बनाने के लिए लिखा जाता है, कंप्यूटर पर चलाने के लिए नहीं।] - Decision table: Organizes rules/logic, not instructions for computers.
[translate:डिसीजन टेबल नियमों को व्यवस्थित करता है, कंप्यूटर के निर्देश नहीं।]
Q5. The language understood by a computer without translation is called:
[translate:Q5. कंप्यूटर द्वारा बिना अनुवाद के समझी जाने वाली भाषा को क्या कहा जाता है?]
- a) Command language
- b) High-level language
- c) Assembly language
- d) Machine language
Answer: d) Machine language
Explanation: Computer only ‘knows’ machine language (binary), which uses just 0s and 1s; everything else needs to be converted first.
[translate:व्याख्या: कंप्यूटर केवल मशीन भाषा (बाइनरी - 0 और 1) ही ‘समझता’ है, बाक़ी सभी भाषाओं को पहले अनुवादित करना पड़ता है।]
Other options explanation:
- Command language: Used for giving instructions, but still needs translation.
[translate:कमांड भाषा निर्देशों के लिए होती है, लेकिन अनुवाद की आवश्यकता होती है।] - High-level language: Easy for humans, difficult for computers without conversion.
[translate:उच्च स्तर की भाषा इंसानों के लिए आसान है, लेकिन कंप्यूटर इसे सीधे नहीं समझता।] - Assembly language: Closer to machine language, but not pure binary; needs assembler for translation.
[translate:असेम्बली भाषा मशीन भाषा के करीब है, पर इसमें भी अनुवादक (असेम्बलर) की जरूरत होती है।]
Comments
Post a Comment