Programming and Problem Solving Through Python Language Theory Question

Introduction to Programming

  1. Who developed the Pyhton Language.?
    1. Dennis M. Ritchie
    2. James Gosling
    3. Guido Van Rossum
    4. Linus Torvalds
    Answer : c
    Explain: Python Language was developed by Guido van Rossum in 1989 and first officially release in 1991.
  2. Python Language written in which language ?
    1. C
    2. PHP
    3. Ruby
    4. Java
    Answer : a
    Explain: Python Language was written in C language and the default implementation is called CPython. C language is develop by Dennis M Ritchie in 1972.
  3. What is the extension of the python file.
    1. .py
    2. .po
    3. .python
    4. .file
    Answer :a
    Explain : The Extension of python file are- .py , pyi.
  4. Single line comment in python use ?
    1. //
    2. */
    3. #
    4. ""
    Answer :c
    Explain : Use # for single line comment and triple ('''-single quoted, "- double quoted) are use for multi-line comment.
  5. Which of the following language is understood by computer ?
    1. HL language
    2. LL language
    3. Machine Language
    4. English language
    Answer : C
    Explain : Computer understand only machine language which is 0 or 1.
  6. A computer programme that controls and managed computer activity ?
    1. O.S
    2. Compiler
    3. Modem
    4. Mouse
    Answer : A
    Explain : O.S. ( Operating System ) control computer activity.
  7. In which year was the python 3.0 version developed ?
    1. 2000
    2. 2005
    3. 1998
    4. 2008
    Answer: d
    Explain : Python 3.0 was launched in 2008 ( latest version 3.11.4 in 2023 ) and pyhton 2.0 lauch in 2000.
  8. Which is a part of user documentation.
    1. Class Diagram
    2. Code Comment
    3. Use Case
    4. Installation Guide
    Answer : D
    Explan : User or customer need how to instal product. They don't need code comment or other things.
  9. Testing is known as ?
    1. A stage of all projects
    2. Finding broken code
    3. Evaluating deliverable to find error
    4. None
    Answer : C
    Explan : Testing is done after programming to check bugs and error in a program.
  10. Which of following is language translator ?
    1. Compiler
    2. Interprater
    3. Assembler
    4. All of these.
    Answer: d
    Explain : All of them are language translator which translate source code (code written by prgrammer) into object code.
  11. Bug in a prgram means ?
    1. Logical Error found in program
    2. Code run perfectly
    3. No error in program
    4. None of these.
    Answer: a
    Explain : Bug means error in program and the process of finding bug in program known as debugging.
  12. Is Python case sensitive when dealing with identifiers?
    1. Yes
    2. no
    3. in some cases
    4. All of these.
    Answer : a
    Explain : Pyhton is a case senstive language. So, the name assign to indentifier must be case senstive.
  13. Which of following is not a valid error ?
    1. Syntax Error
    2. Run-Time Error
    3. Logical Error
    4. None of these
    Answer : d
    Explain : All these are error in programming.
  14. Compiler converts ?
    1. Whole program.
    2. line by line
    3. word by word
    4. half program first and then second.
    Answer : a
    Explain : Compiler converts whole program and interprater converts line by line.
  15. Who wrote the first programming language ?
    1. Ajay Bhatt
    2. Ada Lovelace
    3. James Ruseel
    4. Ray Tomlinson
    Answer : B
    Explain : Ada Lovelace who has written the first-ever computer programming language and the year was 1883. (That's why it is difficult because of women - Just Kidding !)
  16. Who was the father of C language ?
    1. Dennis M. Ritchie
    2. Guido Van Rossum
    3. James Gosling
    4. John Backus
    Answer : A
    Explain : Guido Van Rossum - found Pyhton, James Gosling found- Java and John Backus found- FORTRAN.
  17. A set of intructions that tells the computer how to behave, what to do and derive at a solution to a particular problem is:
    1. Algorithm
    2. Pseudocode
    3. Programming
    4. Program
    Answer : D
    Explain : A set of instructionsthat directs a computer's hardware to perform a task is called a program.
  18. The six stages of program development in logical order are:
    1. Define, Analyze, Write, Test, Document, Debug
    2. Define, Analyze, Develop, Write, Test and Debug, Document
    3. Define, Write, Develop, Analyze, Test, Document
    4. Define, Develop, Write, Test, Document, Debug
    Answer : B
    Explain : First, the problem is defined and the requirements are marked. Then, the program is analyzed to determine the best design. Next, the development process begins where the code is written. After that, testing and debugging are done to ensure the program functions correctly. At last the documentation created so for future use program can understand it.
  19. Which of the following generations of programming language executed code faster:
    1. 4 Gen.
    2. 2 Gen.
    3. 1 Gen.
    4. 3 Gen.
    Answer : C
    Explain : First-generation languages were low-level languages that directly interacted with the hardware, it make it fast.
  20. Which of the following had executes programming codes line by line, rather than the whole program :
    1. Compiler
    2. Interpreter
    3. Translator
    4. None of these
    Answer : B
    Explain : Interpreter converts the program line by line, where as compiler converts whole program.

Next Set

2

Make sure you make notes of these question. We hope it helps you.