Introduction To Computer Science And Python Programming

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 Yetunde Folajimi
Y
Yetunde Folajimi
Community Contributor
Quizzes Created: 2 | Total Attempts: 1,815
Questions: 40 | Attempts: 509

SettingsSettingsSettings
Introduction To Computer Science And Python Programming - Quiz

Introduction to Computer Science and Python Programming


Questions and Answers
  • 1. 

    What is the decimal value of the hexadecimal number 777?

    Explanation
    The decimal value of a hexadecimal number can be found by multiplying each digit of the hexadecimal number by the corresponding power of 16 and then summing up the results. In this case, the hexadecimal number 777 has three digits: 7, 7, and 7. When multiplied by the corresponding powers of 16 (16^2, 16^1, and 16^0), the results are 1792, 112, and 7, respectively. Adding these results together gives us 1911, which is the decimal value of the hexadecimal number 777.

    Rate this question:

  • 2. 

    __________ is a way by which we can prevent data interception  

    • A.

      Data decryption

    • B.

      Data Transmission

    • C.

      Data Encryption

    • D.

      Data Automation

    Correct Answer
    C. Data Encryption
    Explanation
    Data encryption is a way by which we can prevent data interception. It involves converting the original data into an unreadable form using encryption algorithms. This ensures that even if the intercepted data is accessed by unauthorized individuals, they will not be able to understand or use it without the decryption key. Encryption provides a secure method of protecting sensitive information during transmission or when stored on devices, thereby safeguarding against unauthorized access and maintaining data confidentiality.

    Rate this question:

  • 3. 

    Which of the following statements is/are true?

    • A.

      A megabyte is roughly 1 million characters

    • B.

      A terabyte can store roughly 1 trillion characters

    • C.

      A terabyte can store more than just a few books

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    The given answer "All of the above" is correct because all three statements are true. A megabyte is approximately equal to 1 million characters, a terabyte can store roughly 1 trillion characters, and it can also store more than just a few books.

    Rate this question:

  • 4. 

    • Convert 765(octal) to hexadecimal 

    Correct Answer
    1F5
    Explanation
    To convert from octal to hexadecimal, we can first convert the octal number to binary and then convert the binary number to hexadecimal. In this case, the octal number 765 can be converted to binary as 111 110 101. Then, grouping the binary digits into groups of four from right to left, we get 0111 1101, which is equal to 1F in hexadecimal. Finally, adding the remaining digit 0 at the leftmost position, we get the hexadecimal number 1F5.

    Rate this question:

  • 5. 

    Convert AD1(hexadecimal) to decimal 

    Correct Answer
    2769
    Explanation
    To convert a hexadecimal number to decimal, each digit of the hexadecimal number is multiplied by the corresponding power of 16 and then summed. In this case, the hexadecimal number AD1 is converted to decimal by multiplying the digit A by 16^2 (256), the digit D by 16^1 (208), and the digit 1 by 16^0 (1). Adding these values together gives the decimal equivalent of 2769.

    Rate this question:

  • 6. 

    Data encryption is __________

    • A.

      A way by which we can decrypt data

    • B.

      The process of transforming data into an unintelligible form

    • C.

      Undoing the transformation of data at the point of reception

    • D.

      B & C

    Correct Answer
    B. The process of transforming data into an unintelligible form
    Explanation
    Data encryption is the process of transforming data into an unintelligible form. This is done to protect the confidentiality and security of the data, as encrypted data can only be accessed and understood by authorized parties who possess the encryption key. Encryption ensures that even if the data is intercepted or stolen, it cannot be easily understood or used by unauthorized individuals.

    Rate this question:

  • 7. 

    ________ was prominent in 5th generation computers

    • A.

      Large Scale Integration

    • B.

      Very Large Scale Integration

    • C.

      Extremely Large Scale Integration

    • D.

      A & B

    Correct Answer
    B. Very Large Scale Integration
    Explanation
    Very Large Scale Integration (VLSI) was prominent in 5th generation computers. VLSI refers to the process of integrating a large number of transistors onto a single chip, allowing for greater functionality and increased computing power. This technology was a significant advancement in computer architecture during the 5th generation, enabling the development of more powerful and efficient computers.

    Rate this question:

  • 8. 

    Which of the following statements is/are true? 

    • A.

      A megabyte is roughly 1 million characters

    • B.

      A terabyte can store roughly 1 trillion characters

    • C.

      A&B

    • D.

      None of the above

    Correct Answer
    C. A&B
    Explanation
    The given answer, A&B, is correct. A megabyte is roughly 1 million characters and a terabyte can store roughly 1 trillion characters. Therefore, both statements A and B are true.

    Rate this question:

  • 9. 

    What is the approximate value of 453 kilobyte in megabyte?

    • A.

      453

    • B.

      0.453

    • C.

      4530

    • D.

      0.0453

    Correct Answer
    B. 0.453
    Explanation
    453 kilobytes is equal to 0.453 megabytes. This can be determined by dividing the number of kilobytes by 1024, since there are 1024 kilobytes in a megabyte. Therefore, 453 divided by 1024 equals 0.453.

    Rate this question:

  • 10. 

    What is the result of the following hexadecimal arithmetic :10240 - 82A3  

    • A.

      1F9D

    • B.

      843D

    • C.

      7F9D

    • D.

      743D

    Correct Answer
    C. 7F9D
    Explanation
    The result of the hexadecimal arithmetic 10240 - 82A3 is 7F9D.

    Rate this question:

  • 11. 

    What does an RGB value of (0, 0, 0) represent?

    • A.

      Black

    • B.

      White

    • C.

      Violet

    • D.

      Yellow

    Correct Answer
    A. Black
    Explanation
    An RGB value of (0, 0, 0) represents black. In the RGB color model, each value corresponds to the intensity of red, green, and blue respectively. A value of 0 means there is no intensity of that color, resulting in the absence of any color. Therefore, when all three values are 0, it represents the absence of all colors, resulting in black.

    Rate this question:

  • 12. 

    Who is the first female professor of Computer Science in Africa? 

    • A.

      Prof. Adenike Osofisan

    • B.

      Prof Adebola Osofisan

    • C.

      Prof. Femi Osofisan

    • D.

      Prof Adefemi Osofisan

    Correct Answer
    A. Prof. Adenike Osofisan
    Explanation
    Prof. Adenike Osofisan is the first female professor of Computer Science in Africa.

    Rate this question:

  • 13. 

    The decision as to what data structures to use in implementing a system is best handled during ______  

    • A.

      Program design

    • B.

      Maintenance

    • C.

      System design

    • D.

      Delivery

    Correct Answer
    A. Program design
    Explanation
    During the program design phase, the overall structure and organization of the software system is determined. This includes deciding on the appropriate data structures to use for storing and manipulating data. The choice of data structures is crucial as it directly impacts the efficiency and performance of the system. Therefore, the decision of what data structures to use is best handled during program design.

    Rate this question:

  • 14. 

    One byte has ________ bits.

    • A.

      8

    • B.

      4

    • C.

      5

    • D.

      8

    Correct Answer
    A. 8
    Explanation
    One byte consists of 8 bits. This is a standard measurement in computer systems, where each bit represents a binary value of either 0 or 1. Therefore, the correct answer is 8.

    Rate this question:

  • 15. 

    A ___________ error does not cause the program to abort, but produces incorrect results.

    • A.

      Syntax

    • B.

      Runtime

    • C.

      Logic

    • D.

      Ende-time

    Correct Answer
    C. Logic
    Explanation
    A logic error refers to a mistake in the program's logic or reasoning, where the program may run without any issues or errors, but the output or results produced are incorrect. Unlike a syntax error, which causes the program to fail and not run at all, a logic error allows the program to run but produces inaccurate or unexpected outcomes.

    Rate this question:

  • 16. 

    Which of these is not true of abstract data structures     

    • A.

      A queue and a stack have two external pointers

    • B.

      Python supports dictionaries data structures

    • C.

      Python supports dictionaries data structures

    • D.

      A queue is a FIFO data structure

    Correct Answer
    A. A queue and a stack have two external pointers
    Explanation
    The statement that "A queue and a stack have two external pointers" is not true. Both a queue and a stack have internal pointers to keep track of the elements, but they do not have two external pointers. A queue follows the FIFO (First-In-First-Out) principle, while a stack follows the LIFO (Last-In-First-Out) principle. Python does support dictionaries as a data structure.

    Rate this question:

  • 17. 

    What is the result of the statement:print ("1 + 3 * 2-5") 

    • A.

      "1 + 3 * 2+5"

    • B.

      7

    • C.

      8

    • D.

      1 + 3 * 2-5

    Correct Answer
    D. 1 + 3 * 2-5
    Explanation
    The result of the statement "print ("1 + 3 * 2-5")" is the expression "1 + 3 * 2-5" itself. The print function in Python displays the output to the console, so when this statement is executed, it will print "1 + 3 * 2-5" as the output.

    Rate this question:

  • 18. 

    Which of the followings is not an example of a linear data structure  

    • A.

      List

    • B.

      Queue

    • C.

      Graph

    • D.

      Arrays

    Correct Answer
    C. GrapH
    Explanation
    A graph is not an example of a linear data structure because it does not have a linear or sequential arrangement of its elements. Unlike lists, queues, and arrays which have elements arranged in a linear fashion, a graph consists of vertices and edges that can be connected in any way. A graph can have multiple connections between vertices, creating a complex and non-linear structure. Therefore, a graph is not considered a linear data structure.

    Rate this question:

  • 19. 

    Which of the following lines of code comes from a first generation computer language?

    • A.

      ADD255(3,10),02B

    • B.

      00010 1010 1101 0001 1010

    • C.

      This Total=TotalA + TotalC

    • D.

      Print("x > 0 and y > 0")

    Correct Answer
    B. 00010 1010 1101 0001 1010
    Explanation
    The line of code "00010 1010 1101 0001 1010" comes from a first generation computer language. This is because it is written in binary code, which was used in the first generation of computers. Binary code consists of only 0s and 1s, representing machine language instructions that the computer can directly understand and execute.

    Rate this question:

  • 20. 

    The _____ operation says if and only if all inputs are 1, the output will be 1. The output will be 0 if any of the inputs are 0.

    • A.

      OR

    • B.

      NAND

    • C.

      NOR

    • D.

      AND

    Correct Answer
    D. AND
    Explanation
    The AND operation is the correct answer because it follows the given condition that if and only if all inputs are 1, the output will be 1. If any of the inputs are 0, the output will be 0. This aligns with the behavior of the AND gate, which only produces a 1 output when all of its inputs are 1, and otherwise produces a 0 output.

    Rate this question:

  • 21. 

    What was the first truly mass auxiliary storage device?

    • A.

      Hard disk drive

    • B.

      Magnetic disk drive

    • C.

      Main memory drive

    • D.

      Magnetic tape drive

    Correct Answer
    D. Magnetic tape drive
    Explanation
    The first truly mass auxiliary storage device was the magnetic tape drive. Magnetic tape drives were widely used in the early days of computing to store large amounts of data. They were capable of storing large volumes of information and were relatively inexpensive compared to other storage options at the time. Magnetic tape drives were used for tasks such as data backup, archiving, and transferring data between different computer systems.

    Rate this question:

  • 22. 

    Which of the options A to E gives the correct sequence for the software development methods listed below(i)Specification of needs (ii)Algorithm design (iii)Problem analysis (iv)Documentation (v)Testing and verification (vi)Implementation

    • A.

      I,ii,iii,iv,v,vi

    • B.

      I,iii,ii,v,vi,iv

    • C.

      I,iii,ii,vi,v,iv

    • D.

      I,ii,iii,v,vi,iv

    Correct Answer
    C. I,iii,ii,vi,v,iv
    Explanation
    The correct sequence for the software development methods listed is as follows: (i) Specification of needs, (ii) Problem analysis, (iii) Algorithm design, (iv) Implementation, (v) Testing and verification, (vi) Documentation. This sequence follows a logical order of steps in the software development process, starting with identifying the needs and requirements, analyzing the problem, designing the algorithm, implementing the solution, testing and verifying its functionality, and finally documenting the process and outcome.

    Rate this question:

  • 23. 

    Suppose x = 1, y = -1, and z = 1. What will be displayed by the following statement?x = 1y = -1z = 1.if x > 0:  if y > 0:     print("x > 0 and y > 0")elif z > 0:  print("x < 0 and z > 0")

    • A.

      X > 0 and y > 0

    • B.

      X < 0 and z < 0

    • C.

      Nothing is displayed

    • D.

      The program has syntax error and won't run

    Correct Answer
    C. Nothing is displayed
    Explanation
    The condition x > 0 is not satisfied because x = 1. Therefore, the code inside the if statement is not executed. Similarly, the condition y > 0 is also not satisfied because y = -1. The elif statement is also not executed because z > 0 is not true as z = 1. Hence, nothing is displayed by the given statement.

    Rate this question:

  • 24. 

    Analyze the following code.even = Trueif even = True:print("It is even!") 

    • A.

      The program has syntax error in lines 1 and 2

    • B.

      The program has a syntax error in line 2

    • C.

      The program runs and displays True

    • D.

      The program runs and displays It is even!.

    Correct Answer
    B. The program has a syntax error in line 2
    Explanation
    The code has a syntax error in line 2 because the variable "even" is being assigned a value instead of being compared. The correct way to compare the value of "even" would be to use the double equals sign (==).

    Rate this question:

  • 25. 

    Eliminating errors in a program is also called ______ the program

    • A.

      Debugging

    • B.

      Modularizing

    • C.

      Clarifying

    • D.

      All of the above

    Correct Answer
    A. Debugging
    Explanation
    Debugging is the correct answer because it refers to the process of identifying and fixing errors or bugs in a program. It involves tracing and analyzing the program's code to locate and resolve issues that may cause the program to behave unexpectedly or produce incorrect results. Debugging is an essential step in the software development process to ensure that the program functions correctly and meets the desired requirements. The other options, modularizing and clarifying, do not specifically relate to the process of eliminating errors in a program.

    Rate this question:

  • 26. 

    What is the value of i printed in the following program?j = i = 0i += j + j * 5print(i)

    • A.

      0

    • B.

      1

    • C.

      3

    • D.

      6

    Correct Answer
    A. 0
    Explanation
    The value of i is 0 because the program first assigns 0 to both j and i. Then, it adds the value of j (which is 0) to the product of j and 5 (which is also 0), resulting in 0. Finally, it assigns the value of 0 to i. Therefore, when i is printed, it will display 0.

    Rate this question:

  • 27. 

    Which of the following if statements assigns a value 5 to y if x is not greater than or equal to 0

    • A.

      If x > 0: y =5

    • B.

      If x >= 0: y =5

    • C.

      If x < 0: y =5

    • D.

      If x

    Correct Answer
    C. If x < 0: y =5
    Explanation
    The correct answer is "if x < 0: y = 5". This statement assigns a value of 5 to y only if x is less than 0. The other if statements either assign a value of 5 to y when x is greater than 0 or when x is greater than or equal to 0.

    Rate this question:

  • 28. 

    Which of the following statements is/are not true?(i) The instruction register (IR) contains the next instruction to be executed(ii) theProgram counter (PC) contains the address of the next instruction to beexecuted

    • A.

      Both i & ii

    • B.

      I only

    • C.

      Ii only

    • D.

      None

    Correct Answer
    B. I only
    Explanation
    The statement "The instruction register (IR) contains the next instruction to be executed" is not true. The instruction register (IR) actually contains the instruction that is currently being executed, not the next instruction. The correct answer is i only.

    Rate this question:

  • 29. 

    __________ can also be referred to as the Bandwidth of a network

    • A.

      Data Transfer Rate

    • B.

      Network

    • C.

      Switching

    • D.

      Internet

    Correct Answer
    A. Data Transfer Rate
    Explanation
    The term "Data Transfer Rate" can also be used interchangeably with "Bandwidth" when referring to a network. Bandwidth refers to the amount of data that can be transmitted over a network in a given amount of time. Data Transfer Rate, on the other hand, measures the speed at which data is transferred between devices or over a network. Both terms essentially describe the capacity or capability of a network to transmit data.

    Rate this question:

  • 30. 

    Machine language is composed only of ______

    • A.

      Hexadecimal numbers

    • B.

      Memory words

    • C.

      Binary numbers

    • D.

      Python statements

    Correct Answer
    C. Binary numbers
    Explanation
    Machine language is composed only of binary numbers. Machine language is the lowest level of programming language that can be directly understood and executed by a computer. It consists of a sequence of binary digits (0s and 1s) that represent specific instructions and data. These binary numbers are used to control the computer's hardware and perform various operations. Hexadecimal numbers and memory words can be used to represent and manipulate data in machine language, but the language itself is based on binary numbers. Python statements, on the other hand, are part of a high-level programming language and are not directly used in machine language.

    Rate this question:

  • 31. 

    If a number is too large to be stored in memory, it _____________.

    • A.

      Causes syntax error

    • B.

      Causes overflow

    • C.

      cannot happen in Python

    • D.

      Causes underflow

    Correct Answer
    B. Causes overflow
    Explanation
    When a number is too large to be stored in memory, it causes an overflow. This means that the number exceeds the maximum value that can be represented by the data type or memory size being used. In such cases, the program may crash or produce unexpected results, as it is unable to handle such a large number.

    Rate this question:

  • 32. 

    What is the extension of any Python 33 saved file? 

    • A.

      Python

    • B.

      Pyth

    • C.

      Py

    • D.

      Txt

    Correct Answer
    C. Py
    Explanation
    The extension of any Python 33 saved file is ".py". This is the standard file extension for Python source code files. It helps to identify the file as a Python script and allows it to be executed by the Python interpreter.

    Rate this question:

  • 33. 

    • Which of the followings is not a kind of Compact disc?

    • A.

      CD-ROM

    • B.

      DVD

    • C.

      CD-WORM

    • D.

      None of the above

    Correct Answer
    D. None of the above
    Explanation
    The question asks for a type of compact disc that does not exist. The options provided are CD-ROM, DVD, CD-WORM, and None of the above. CD-ROM and DVD are both types of compact discs, and CD-WORM (Write Once Read Many) is also a type of compact disc that allows for data to be written only once. Therefore, the correct answer is None of the above, as all the options listed are types of compact discs.

    Rate this question:

  • 34. 

    • The information that a program requires in order to accomplish its objective is called the----------------------

    • A.

      Data

    • B.

      Contribution

    • C.

      Effort

    • D.

      A and B

    Correct Answer
    A. Data
    Explanation
    The information that a program requires in order to accomplish its objective is called data. Data is essential for a program to perform calculations, make decisions, and produce desired outputs. It can be in the form of inputs provided by users or obtained from external sources. Without data, a program would not have anything to work with and would not be able to achieve its intended purpose.

    Rate this question:

  • 35. 

    Machine language is composed only of ______

    • A.

      Hexadecimal numbers

    • B.

      Binary numbers

    • C.

      Python statements

    • D.

      Memory words

    Correct Answer
    B. Binary numbers
    Explanation
    Machine language is composed only of binary numbers. Machine language is the lowest-level programming language understood by computers. It consists of a series of binary instructions that the computer can directly execute. Each instruction is represented by a sequence of 0s and 1s, which correspond to specific operations and data manipulations. Therefore, machine language is composed solely of binary numbers.

    Rate this question:

  • 36. 

     Algorithm and Flow chart help us to 

    • A.

      Know the memory capacity

    • B.

      View the problem completely and clearly

    • C.

      Direct the output to a printer

    • D.

      Identify the base of a number system

    Correct Answer
    B. View the problem completely and clearly
    Explanation
    Algorithm and flowchart help us to view the problem completely and clearly. They provide a visual representation of the steps and logic required to solve a problem. By breaking down the problem into smaller steps and organizing them in a logical sequence, algorithms and flowcharts allow us to analyze the problem more effectively. They help in identifying any potential errors or inefficiencies in the solution approach and provide a clear understanding of the problem-solving process. Overall, algorithms and flowcharts enhance problem-solving by providing a structured and visual representation of the problem and its solution.

    Rate this question:

  • 37. 

    In the expression 45 / 4, the values 45 and 4 on the left and right of the / symbol are called ____.

    • A.

      operators

    • B.

      operands

    • C.

      Parameters

    • D.

      Operations

    Correct Answer
    C. Parameters
    Explanation
    In the expression 45 / 4, the values 45 and 4 on the left and right of the / symbol are called parameters. Parameters are the values that are passed into a function or operation to perform a specific task. In this case, the / symbol represents the division operation, and the parameters 45 and 4 are being divided to give the result.

    Rate this question:

  • 38. 

    A compiler performs which of the following functions 

    • A.

      Translates and executes each program statement one at a time

    • B.

      Converts the source code into machine language code

    • C.

      Translates instruction codes from assembler language into machine language

    • D.

      uses statements to tell objects to perform actions on thems

    Correct Answer
    B. Converts the source code into machine language code
    Explanation
    A compiler is a software program that takes the source code written in a high-level programming language and converts it into machine language code that can be executed by the computer's processor. This process is known as compilation. The compiler analyzes the source code, checks for errors, and translates it into a form that can be understood and executed by the computer. Therefore, the correct answer is "converts the source code into machine language code."

    Rate this question:

  • 39. 

    At what phase of programming do we make use of Flowcharts and pseudocode?

    • A.

      Specification

    • B.

      Design

    • C.

      Coding

    • D.

      Testing

    Correct Answer
    B. Design
    Explanation
    In the design phase of programming, flowcharts and pseudocode are used to plan and visualize the structure and logic of the program. Flowcharts help in representing the flow of control and decision-making processes, while pseudocode allows programmers to write out the algorithm in a more human-readable format before translating it into actual code. These tools aid in organizing thoughts, identifying potential issues, and communicating the program's design to others involved in the development process.

    Rate this question:

  • 40. 

    In program design, the diamon symbol has 3 branches coming out of it; TRUE or FALSE?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The diamon symbol in program design typically represents a decision point or a conditional statement, such as an if-else statement. It usually has two branches coming out of it, one for the true condition and another for the false condition. Therefore, the statement that the diamon symbol has 3 branches coming out of it is false.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 01, 2014
    Quiz Created by
    Yetunde Folajimi
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.