Computer And Python Programming: Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By G SINDHUJA
G
G SINDHUJA
Community Contributor
Quizzes Created: 1 | Total Attempts: 147
Questions: 15 | Attempts: 147

SettingsSettingsSettings
Computer And Python Programming: Quiz - Quiz

.


Questions and Answers
  • 1. 

    The basic operations performed by a computer are?

    • A.

      Arithmetic operation

    • B.

      Logical operation

    • C.

      Storage and relative

    • D.

      All the above

    Correct Answer
    D. All the above
    Explanation
    The basic operations performed by a computer include arithmetic operations, logical operations, and storage and retrieval. Arithmetic operations involve mathematical calculations such as addition, subtraction, multiplication, and division. Logical operations involve comparisons and decision-making using logical operators like AND, OR, and NOT. Storage and retrieval refer to the ability of a computer to store and access data from memory or storage devices. Therefore, the correct answer is "All the above" as all of these operations are fundamental to computer functioning.

    Rate this question:

  • 2. 

    Microprocessors as switching devices are for which generation computers?

    • A.

      First Generation

    • B.

      Second Generation

    • C.

      Third Generation

    • D.

      Fourth Generation

    Correct Answer
    D. Fourth Generation
    Explanation
    Microprocessors as switching devices are primarily associated with the Fourth Generation of computers. This generation, which emerged in the late 1970s and lasted until the mid-1980s, was characterized by the use of microprocessors as the central processing unit (CPU) in computers. Microprocessors enabled computers to become smaller, more powerful, and more affordable. They revolutionized the field of computing by integrating multiple components onto a single chip, making computers more efficient and accessible. Therefore, the use of microprocessors as switching devices aligns with the advancements of the Fourth Generation of computers.

    Rate this question:

  • 3. 

    The brain of any computer system is:

    Correct Answer
    CPU
    Explanation
    The brain of a computer system is the CPU, or Central Processing Unit. The CPU is responsible for executing instructions and performing calculations, making it the most important component of a computer. It processes data and controls the other hardware components, allowing the computer to perform tasks and run programs. Without the CPU, a computer would not be able to function or carry out any operations. Therefore, the CPU is often referred to as the brain of the computer system.

    Rate this question:

  • 4. 

    Which of the following is not a keyword?

    • A.

      Eval

    • B.

      Assert

    • C.

      Non local

    • D.

      Pass

    Correct Answer
    A. Eval
    Explanation
    The keyword "eval" is used in Python to evaluate a string as a Python expression. It is not a function or a variable, but a keyword that performs a specific action. Therefore, "eval" is a keyword in Python, making it the incorrect answer to the question.

    Rate this question:

  • 5. 

    Which one of these is floor division?

    • A.

      /

    • B.

      //

    • C.

      %  

    • D.

      None of the mentioned

    Correct Answer
    B. //
    Explanation
    The double slash "//" is the floor division operator in Python. Floor division returns the largest integer that is less than or equal to the division of the two operands. It essentially rounds down the result to the nearest whole number. This is different from the regular division operator "/" which returns the exact quotient as a float. The percentage symbol "%" is the modulus operator, used to find the remainder of the division. Therefore, the correct answer is "//".

    Rate this question:

  • 6. 

    Mathematical operations can be performed on a string. 

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    Mathematical operations cannot be performed on a string. Strings are sequences of characters and do not have numerical values that can be manipulated using mathematical operations like addition, subtraction, multiplication, or division. Mathematical operations are only applicable to numerical data types like integers or floating-point numbers.

    Rate this question:

  • 7. 

    For tuples and list which is correct?

    • A.

      List and tuples both are mutable.

    • B.

      List is mutable whereas tuples are immutable.

    • C.

      List is immutable whereas tuples are mutable.

    • D.

       - List and tuples both are immutable.

    Correct Answer
    B. List is mutable whereas tuples are immutable.
    Explanation
    The correct answer is "List is mutable whereas tuples are immutable." This means that lists can be changed or modified after they are created, while tuples cannot be changed once they are created.

    Rate this question:

  • 8. 

    What is the output of the following? for i in [1, 2, 3, 4][::-1]: print (i)

    • A.

      1 2 3 4

    • B.

      4 3 2 1

    • C.

      Error

    • D.

      None of the mentioned

    Correct Answer
    B. 4 3 2 1
    Explanation
    The given code snippet uses a for loop to iterate over the list [1, 2, 3, 4] in reverse order (using the slicing syntax [::-1]). The loop prints each element of the list on a new line. Therefore, the output of the code will be "4 3 2 1", with each number printed on a separate line.

    Rate this question:

  • 9. 

     Which of the following functions is a built-in function in python?

    • A.

      Seed()

    • B.

      Sqrt()

    • C.

      Factorial()

    • D.

      Print()

    Correct Answer
    D. Print()
    Explanation
    The function "print()" is a built-in function in Python. It is used to display output on the console. It takes one or more arguments and prints them as a single string or multiple values. This function is commonly used for debugging purposes and to display information to the user.

    Rate this question:

  • 10. 

     What is the output of the expression:   round(4.576)

    • A.

      4.5

    • B.

       5

    • C.

      4

    • D.

      4.6

    Correct Answer
    B.  5
    Explanation
    The round() function is used to round a number to the nearest whole number. In this case, the number 4.576 is rounded to the nearest whole number, which is 5.

    Rate this question:

  • 11. 

    What data type is the object below? L = [1, 23, ‘hello’, 1].

    • A.

      List

    • B.

      Dictionary

    • C.

      Array

    • D.

      Tuple

    Correct Answer
    A. List
    Explanation
    The object L is a list because it is enclosed in square brackets and contains a sequence of elements separated by commas. Lists are a type of data structure in Python that can hold different types of data, including numbers, strings, and other objects. In this case, the list contains the elements 1, 23, 'hello', and 1.

    Rate this question:

  • 12. 

    A device used for video games, flight simulators, training simulators, and for controlling industrial robots.

    • A.

      Mouse

    • B.

      Light pen

    • C.

      Joystick

    • D.

      Keyboard

    Correct Answer
    C. Joystick
    Explanation
    A joystick is a device commonly used for video games, flight simulators, training simulators, and controlling industrial robots. It allows users to have precise control over movements in a virtual environment or real-world applications. Unlike a mouse or keyboard, a joystick provides a more intuitive and immersive experience, especially in situations that require precise and continuous input. It typically consists of a lever that can be moved in various directions to control the movement of an object or character on the screen. Therefore, the joystick is the most suitable option for the given description.

    Rate this question:

  • 13. 

    The following box denotes?

    • A.

      Decision

    • B.

      Initiation

    • C.

      Initialization

    • D.

      I/O

    Correct Answer
    A. Decision
    Explanation
    The correct answer is "Decision" because a decision is a choice made between different alternatives based on certain criteria or conditions. In this context, the box represents a decision point where a choice needs to be made. It is different from initiation, initialization, and I/O, which refer to other processes or actions.

    Rate this question:

  • 14. 

    Which of the following represents the bitwise XOR operator?

    • A.

      &

    • B.

      ^

    • C.

      |

    • D.

      !

    Correct Answer
    B. ^
    Explanation
    The bitwise XOR operator is represented by the symbol "^". It is used to perform an exclusive OR operation on two binary numbers. This operation returns a 1 if the corresponding bits in the two numbers are different, and 0 if they are the same.

    Rate this question:

  • 15. 

    What arithmetic operators cannot be used with strings?

    • A.

      +

    • B.

      *

    • C.

    • D.

      All of the mentioned

    Correct Answer
    C. –
    Explanation
    The subtraction operator (–) cannot be used with strings. This is because subtraction is not a valid operation for strings in arithmetic. Strings are a sequence of characters and do not have a numerical value that can be subtracted. The plus operator (+) and the multiplication operator (*) can be used with strings for concatenation and repetition respectively. Therefore, the correct answer is –.

    Rate this question:

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.