Starting Out with Python Chapter 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

binary data

Any piece of data that is stored in a computer's memory must be stored as a _______

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

0 (zero)

The binary representation of a number divisible by 4 ends in

00

The binary equivalent of the decimal numeral 2 is

10

The binary equivalent of the decimal numeral 9 is

1001

The binary equivalent of the decimal numeral 3 is

11

The binary equivalent of the decimal numeral 6 is

110

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

200 MB

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

4 TB

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

5 GB

In modern computer systems, a byte consists of how many bits?

8

Java

A high-level programming language used to create applications for Web sites. It was created by Sun Microsystems in the early 1990's. It can be used to develop programs that run on a single computer or over the Internet from a web server.

What is a high-level programming language?

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

What is a program?

A set of instructions that a computer follows to perform a task

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

ASCII

What is Two's complement?

An advanced number storage encoding scheme used for negative numbers

What is floating-point notations?

An advanced number storage encoding scheme used for real numbers

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

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.

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

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

BASIC

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.

The part of a computer that runs programs is called __________.

CPU

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

Central Processing Unit (CPU)

What part of the computer actually runs programs?

Central Processing Unit (CPU) (It executes instructions)

COBOL

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

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

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

What is the difference between a compiler and an interpreter?

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.

What is digital data?

Digital data is any data that is stored in binary format

What is digital device?

Digital device is any device that works with binary data.

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

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

FORTRAN

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

True or False Today, CPUs are huge devices made of electrical and mechanical components such as vacuum tubes and switches.

False

external storage(memory) devices

Flash drives, CDs, external disks are all examples of this

Real numbers are encoded using the_____________technique.

Floating point

Decode

In this step, the CPU decodes the instruction that was just fetched (or read) from memory, to determine which operation it should perform.

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

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

What best defines a "programming language"?

It allows us to express an algorithm.

What is assembly language?

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.

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

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

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

Main memory, or RAM

FORTRAN was designed for which groups of people?

Mathematicians, scientists, and engineers.

Today, CPUs are small chips known as __________.

Microprocessors

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

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

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

Output Devices

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

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

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

RAM (random access memory)

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

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

Main memory is also known as ________.

Random Access Memory (RAM)

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

Random Access Memory (RAM)

What is hardware?

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.

The statements that a programmer writes in a high-level language are called what?

Source code or code

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

Syntax

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

Syntax error

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

System Software. Such as Windows, Linux, Mac OS

What is a utility program?

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.

What is the purpose of ASCII?

The American Standard Code for Information Interchange is a set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters.

Why is the CPU the most important component in a computer?

The CPU is the most important component in a computer because without it, the computer could not run software.

List 5 major components of a computer system.

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

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

The fetch-decode-execute cycle

Fetch

The first step of this cycle is to___________, or read the next instruction from memory into the the CPU.

Execute

The last step in a 3 step cycle in the CPU to perform the operation.

C#

This language was created by Microsoft around the year 2000 for developing applications based on the Microsoft .NET platforms.

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

Unicode

What encoding scheme is extensive enough to represent the characters of many of the languages in the world?

Unicode

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

Utility Program

Ada

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.

On=1 Off =0

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

What happens when you have a syntax error?

You receive an error message and the program can not be compiled or executed.

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

a stream of binary numbers

How many bytes in a Gigabyte GB

about 1 billion bytes

How many bytes in a Megabyte MB

about 1 million bytes

How many bytes in a Kilobyte KB

about 1 thousand bytes

How many bytes in a Terabyte TB

about 1 trillion bytes

A byte in memory is identified by a unique number called its

address

Machine languages can be used to express

algorithms

An operating system does what?

allocates resources like memory to programs that are running

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

an instruction

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

an interpreter

JavaScript

an object-oriented computer programming language commonly used to create interactive effects within web browsers. It was created in the 1990's and can be used in Web pages. It is not related to another programming language that goes by a similar name.

C and C++

are powerful, general-purpose languages developed at Bell Laboratories in the 1970's and 1980's.

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

assembler

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

binary

What does the term bit stand for?

binary digit

In what numbering system are all numeric values written as sequences of 0s and 1s?

binary numbering system

Images, like the ones you make with your digital camera, cannot be stored as

binary numbers

What do you call a tiny "switch" that can be set to either on or off?

bit

A byte is made up of eight

bits

How do you start Python in the interactive mode

by typing in python in the command line

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

byte

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

compile

A(n)__________program translates a high-level language program into a separate machine language program.

compiler

Machine language is produced by

compilers

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

digital device

The physical devices that a computer is made of are referred to as __________.

hardware

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

high-level language

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

input device

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

interpreter

Visual Basic

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.

A machine language instruction

is a binary number that represents a command that tells the CPU to perform an operation.

Python

is a general-purpose language created in the early 1990's. It has become popular in business and academic applications.

Ruby

is a general-purpose language that was created in the 1990's. It is increasingly becoming a popular language for programs that run on Web servers.

A program

is a long sequence of machine language instructions.

Application software is what?

is any software that runs with the support of the operating systems.

A binary digit (choose one) is either positive or negative, is zero or one, requires one byte of storage, is 2, is none of the above.

is zero or one

The words that make up a high-level programming language are called __________.

key words

Words that have a special meaning in programming language are called

key words or reserved words

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

machine language

Computers can only execute programs that are written in __________.

machine language

Computers can only execute programs written in

machine language

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

main memory

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

main memory

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

mnemonics

When a program is not running, it is stored

on a disk

What amount of memory is enough to store a letter of the alphabet or a small number?

one byte

A video display is a(n) __________ device.

output

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

pixels

A(n) is a set of instructions that a computer follows to perform a task. a. compiler b. program c. interpreter d. programming language

program

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

secondary storage

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

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

The rules that must be followed when writing a program are called __________.

syntax

A compiler does what?

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

Negative numbers are encoded using the __________ technique.

two's complement

Pascal

was created in 1970 and was originally designed for teaching programming. the language was named in honor of the mathematician, physicist, and philosopher Blaise Pascal.

RAM, random-access memory, is called that because

you can pick any two random locations and it will take the same time to access the data

Machine language consists of

zeros and ones


Kaugnay na mga set ng pag-aaral

chapter 28: Child, Older Adult, and Intimate Partner Violence

View Set

2.1 Matter is the stuff of the universe & energy moves matter

View Set