Test 1 Mod 1-2 Flashcards

(37 cards)

1
Q

Program

A

set of instructions that a computer follows to perform a task
Commonly referred to as Software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Hardware

A
The physical devices that make up a computer
Typical major components:
Central processing unit
Main memory
Secondary storage devices
Input and output devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Byte

A

just enough memory to store letter or small number
Divided into eight bits
Bit: electrical component that can hold positive or negative charge, like on/off switch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ASCII

A

Most important coding scheme is ASCII

ASCII is limited: defines codes for only 128 characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Unicode

A

coding scheme becoming standard
Compatible with ASCII
Can represent characters for other languages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

CPU

A

designed to perform simple operations on pieces of data
Examples: reading data, adding, subtracting, multiplying, and dividing numbers
To carry out meaningful calculation, CPU must perform many operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Key Words

A

predefined words used to write program in high-level language
Each key word has specific meaning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Operators

A

perform operations on data

Example: math operators to perform arithmetic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Syntax

A

set of rules to be followed when writing program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Statement

A

individual instruction used in high-level language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Compiler

A

: translates high-level language program into separate machine language program
Machine language program can be executed at any time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Interpreter

A

translates and executes instructions in high-level language program
Python uses an interpreter
Interprets one instruction at a time
No separate machine language program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Source Code

A

statements written by programmer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Program development cycle

A
Design the program
Write the code
Correct syntax errors
Test the program
Correct logic errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Algorithim

A

set of well-defined logical steps that must be taken to perform a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Psuedocode

A

Uses English-like phrases and terms to outline a task

17
Q

Flowchart

A

Graphically depicts the logical steps to carry out a task

shows how the steps relate to each other

18
Q

Function

A

piece of prewritten code that performs an operation

print()

19
Q

string

A

sequence of characters that is used as data

20
Q

String Literal

A

string that appears in actual code of a program

must be enclosed in single (‘) or double (“) quote marks

21
Q

Variable

A

Name that represents a value stored in the computer memory
Used to access and manipulate data stored in memory
A variable references the value it represents

22
Q

Input

A

function displays a prompt (based on argument passed to function call) and waits for user input

23
Q

Float

A

() function converts the string value returned from the input function into a number (specifically, a floating-point number).

24
Q

//

A

integer division that divides one number by another and gives the result as a whole number

25
%
Remainder division divides one number by another and shows the remainder
26
**
Exponent raises number to a power
27
Concatenation
taking multiple strings and combining them into a new string | when working with strings, the + symbol means concatenation
28
Augmented Assignemtn
An augmented assignment allows a variable to be part of the expression. pay = + 20 pay += 20
29
Simultaneous Assignement
Multiple assignments in single statement
30
Split
method will take multiple input values and separate them. By default, it separates at the spaces, but a delimiter value could be used to separate on another character.
31
Escape Sequences
``` Backspace \b Tab \t Linefeed \n Backslash \\ Single Quote \' Double Quote \" ```
32
Delimeter
Character used in place of default character ``` end='delimiter' causes print() to place delimiter at end of data instead of newline character sep='delimiter' causes print() to use delimiter as item separator ```
33
Format
Can format display of numbers on screen using built-in format() function Two arguments: Numeric value to be formatted Format specifier Returns string containing formatted number Format specifier typically includes precision and data type Can be used to indicate scientific notation, comma separators, and the minimum field width used to display the value
34
Objects
all data—including numbers and strings—are actually objects. Object is an entity each object has an id and a type objects of the same kind have the same type can use the id function and type function to get these information for an object
35
len()
len() returns the number of characters in the string
36
max()
max() returns the character with the highest value (ASCII)
37
min()
min() returns the character with the lowest value