Docsity

STARTING OUT WITH PYTHON 6 CONCEPT GUIDE OBJECT ORIENTED PROGRAMMING DEBUGGING TECHNIQUES, Exams of Information and Communications Technology (ICT)

Toggle sidebar
bg1
STARTING OUT WITH PYTHON 6 CONCEPT GUIDE OBJECT
ORIENTED PROGRAMMING DEBUGGING TECHNIQUES QUESTION
BANK WITH FULL SOLUTIONS
Question 1.
What is hardware?
Answer: Refers to all of the physical components of devices of which a computer
is made. It is not one single device, but a system of devices that work together
like a symphony. Each device in a computer plays its own part.
Question 2.
List 5 major components of a computer system.
Answer: The CPU, RAM (main memory), Disk or Disk Drives (secondary memory)
Input Devices, Output Devices
Question 3.
What part of the computer actually runs programs?
Answer: Central Processing Unit (CPU) (It executes instructions)
Question 4.
What part of the computer serves as a work area to store a program and its data when
running?
Answer: RAM (random access memory)
Question 5.
What part of the computer holds data for a long period of time; even when there is no
power to the computer?
Answer: Disk Drive/ Disk (inside the computer or external Disk Drive or Thumb
Drive
Question 6.
What part of the computer collects data from people and other devices?
Answer: Input Devices such as - keyboard, Waacom tables, digital camera,
mouse, scanner, microphone
Question 7.
What part of the computer formats and presents data for people and other devices?
Answer: Output Devices such as - Computer monitor, speaker, printer, disc drive
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download STARTING OUT WITH PYTHON 6 CONCEPT GUIDE OBJECT ORIENTED PROGRAMMING DEBUGGING TECHNIQUES and more Exams Information and Communications Technology (ICT) in PDF only on Docsity!

STARTING OUT WITH PYTHON 6 CONCEPT GUIDE OBJECT

ORIENTED PROGRAMMING DEBUGGING TECHNIQUES QUESTION

BANK WITH FULL SOLUTIONS

Question 1.

What is hardware?

Answer: Refers to all of the physical components of devices of which a computer is made. It is not one single device, but a system of devices that work together like a symphony. Each device in a computer plays its own part.

Question 2.

List 5 major components of a computer system.

Answer: The CPU, RAM (main memory), Disk or Disk Drives (secondary memory) Input Devices, Output Devices

Question 3.

What part of the computer actually runs programs?

Answer: Central Processing Unit (CPU) (It executes instructions)

Question 4.

What part of the computer serves as a work area to store a program and its data when running?

Answer: RAM (random access memory)

Question 5.

What part of the computer holds data for a long period of time; even when there is no power to the computer?

Answer: Disk Drive/ Disk (inside the computer or external Disk Drive or Thumb Drive

Question 6.

What part of the computer collects data from people and other devices?

Answer: Input Devices such as - keyboard, Waacom tables, digital camera, mouse, scanner, microphone

Question 7.

What part of the computer formats and presents data for people and other devices?

Answer: Output Devices such as - Computer monitor, speaker, printer, disc drive

Question 8.

What fundamental set of programs control the internal operations of the computers hardware?

Answer: Operating Systems - the most fundamental set of programs on a computer ie. windows, macOC, Linus (system software)

Question 9.

What do you call a program that performs a specialized task, such as virus scanner, a file compression program, or a data backup program?

Answer: Utility Program

Question 10.

Word Processing programs, spreadsheet programs, email programs, web browsers, and game programs belong to what category of software?

Answer: Apps Application Software - make a computer useful for everyday use.

Question 11.

Monitors, printers, status lights are all examples of what type of devices

Answer: Output Devices

Question 12.

At each step of its operation, the input to a Central Processing Unit is

Answer: an instruction

Question 13.

When a program is not running, it is stored

Answer: on a disk

Question 14.

When a program runs on a computer, the part of the computer that carries out the instructions is called the

Answer: Central Processing Unit (CPU)

Question 15.

When a program runs on a computer, it is stored in

Answer: Random Access Memory (RAM)

Answer: Unicode

Question 25.

What is Two's complement?

Answer: An advanced number storage encoding scheme used for negative numbers

Question 26.

What is floating-point notations?

Answer: An advanced number storage encoding scheme used for real numbers

Question 27.

What is digital data?

Answer: Digital data is any data that is stored in binary format

Question 28.

What is digital device?

Answer: Digital device is any device that works with binary data.

Question 29.

A CPU understands instructions that are written only in what language?

Answer: machine language

Question 30.

A program has to be copied into what type of memory each time the CPU executes it?

Answer: Main memory, or RAM

Question 31.

When a CPU executes the instructions in a program, it is engaged in what process?

Answer: The fetch-decode-execute cycle

Question 32.

What is assembly language?

Answer: It is an alternative language to machine language. Instead of using, binary numbers for instructions, assembly language uses short words that are known as mnemonics.

Question 33.

What type of programming language allows you to create powerful and complex programs without knowing how the CPU works?

Answer: high-level language

Question 34.

Each language has a strict set of rules that must be strictly followed when writing a program. What is this set of rules called?

Answer: Syntax

Question 35.

What do you call a program that translates a high-level language program into a separate machine language program?

Answer: **Compiler Note: ASSEMBLY language is translated to Machine language by an ASSEMBLER.

Question 36.

3K means about 3 thousand bytes. How would you express five billion bytes?

Answer: 5 GB

Question 37.

3k means about 3 thousand bytes. How would you express two hundred million bytes?

Answer: 200 MB

Question 38.

3k means about 3 thousand bytes. How would you express four trillion bytes?

Answer: 4 TB

Question 39.

What do you call a program that both translates and executes the instructions in a high-level language program?

Answer: an interpreter

Question 40.

What type of mistake is usually caused by a misspelled word, a missing punctuation character, or the incorrect use of an operator?

Answer: Syntax error

Question 50.

The binary equivalent of the decimal numeral 9 is

Answer: 1001

Question 51.

The binary representation of a number divisible by 4 ends in

Answer: 00

Question 52.

What best defines a "programming language"?

Answer: It allows us to express an algorithm.

Question 53.

Machine languages can be used to express

Answer: algorithms

Question 54.

Machine language consists of

Answer: zeros and ones

Question 55.

Machine language is produced by

Answer: compilers

Question 56.

A compiler does what?

Answer: translates source code into executable code; it is a program that translates a high-level language program into a separate machine language program.

Question 57.

An error in a program that involves a violation of language rules will be detected at ____ time.

Answer: compile

Question 58.

Words that have a special meaning in programming language are called

Answer: key words or reserved words

Question 59.

The computer stores a program while the program is running, as well as the data that the program is working with in

Answer: main memory

Question 60.

A type of memory that can hold data for long periods of time, even when there is no power to the computer is called

Answer: secondary storage

Question 61.

Computers can only execute programs written in

Answer: machine language

Question 62.

How many bytes in a Kilobyte KB

Answer: about 1 thousand bytes

Question 63.

How many bytes in a Megabyte MB

Answer: about 1 million bytes

Question 64.

How many bytes in a Gigabyte GB

Answer: about 1 billion bytes

Question 65.

How many bytes in a Terabyte TB

Answer: about 1 trillion bytes

Question 66.

A program

Answer: is a long sequence of machine language instructions.

Question 67.

Fetch

Answer: Microprocessors

Question 76.

The computer stores a program while the program is running, as well as the data that the program is working with, in ____.

Answer: main memory

Question 77.

This is a volatile type of memory that is used only for temporary storage while a program is running.

Answer: RAM (random access memory, a.k.a. main memory)

Question 78.

A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called ____.

Answer: secondary storage such as a disk drive, thumb drive, CD-RW, hard disk

Question 79.

A component that collects data from people or other devices and sends it to the computer is called ____.

Answer: input device

Question 80.

A video display is a(n) __________ device.

Answer: output

Question 81.

A______________is enough memory to store a letter of the alphabet or small number.

Answer: byte

Question 82.

A byte is made up of eight

Answer: bits

Question 83.

In the_____________numbering system, all numeric values are written as sequences of 0s and 1s.

Answer: binary

Question 84.

A bit that is turned off represents the following value: __________.

Answer: 0 (zero)

Question 85.

A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is __________.

Answer: ASCII

Question 86.

An extensive encoding scheme that can represent characters for many languages in the world is ____.

Answer: Unicode

Question 87.

Negative numbers are encoded using the __________ technique.

Answer: two's complement

Question 88.

Real numbers are encoded using the_____________technique.

Answer: Floating point

Question 89.

The tiny dots of color that digital images are composed of are called __________.

Answer: pixels

Question 90.

If you were to look at a machine language program, you would see _________.

Answer: a stream of binary numbers

Question 91.

The ________translates an assembly language program to a machine language program.

Answer: assembler

Question 92.

The Python language uses an______________, which is a program that both translates and executes the instructions in a high-level language program.

Answer: interpreter

Question 101.

On=1 Off =

Answer: When a bit is turned off or on, this is how it is represented.

Question 102.

What would you call a device that works with binary data?

Answer: digital device

Question 103.

What are the words that make up a high-level programming language called?

Answer: Keywords because they are the words that convey special meaning to the compiler or interpreter.

Question 104.

What are the short words that are used in assembly language called?

Answer: mnemonics

Question 105.

What is the difference between a compiler and an interpreter?

Answer: Compiler Compiler is a program that translates a high level code into machine language. In case of this, compiling and executing are two different processes. Compiler scans the entire program on the whole and report for errors. Example: C++ programming language uses compiler. Interpreter Interpreter is a special program that does the translation and simultaneously executes each and every instruction also. In this, both translation and execution are done simultaneously. Interpreter performs the translation and execution line by line and reports the error if any. Example: Python Programming language uses interpreter.

Question 106.

What is a high-level programming language?

Answer: A language which enables a programmer to write programs that are close to human language. This makes the coding much easier to reader and write

Question 107.

What is the difference between assembly language and high level language?

Answer: An assembly language directly controls the physical hardware. A high level language is much more abstract, which must be compliled; translated into machine language. Examples high level languages include Python, Java,

JavaScript; etc. Examples of assembly language. Programs written in high level languages will never match the raw speed and efficiency of program written in assembly. Linux uses assembly language. Assembly language is one step up from machine language.

Question 108.

What type of software controls the internal operations of the computer's hardware?

Answer: System Software. Such as Windows, Linux, Mac OS

Question 109.

What is a utility program?

Answer: Systems software that provides additional functionality to the operating system and helps make the operating system/computer easier to use, examples are antivirus software, back up software and disk tools.

Question 110.

Ada

Answer: Was created in the 1970's, primarily, for applications used by the US Dept of Defense. The language is named in honor of Countess Ada Lovelace, an influential and historic figure in the fiueld of computing.

Question 111.

BASIC

Answer: Beginners all-purpose Symbolic Instruction code is a general-purpose language that was originally designed in the early 1960's to be a simple enough for beginners to learn. today, there are many different versions of BASIC.

Question 112.

FORTRAN was designed for which groups of people?

Answer: Mathematicians, scientists, and engineers.

Question 113.

FORTRAN

Answer: FORmula TRANslator was the first high-level programming language. It was designed in the 1950's for performing complex mathematical calculations.

Question 114.

COBOL

Answer: Common Business Oriented Language. Developed for programming Business Data. The oldest programming language developed in the 1950's.

servers.

Question 122.

Visual Basic

Answer: is a Microsoft programming language and software development environment that allows programmers to create Windows based applications quickly. It was originally created in the early 1990's.

Question 123.

How do you start Python in the interactive mode

Answer: by typing in python in the command line