Python - Chapter 2

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

input:

any data the program receives while it is running.

camelCase

naming variables style. begins with lowercase, second and subsequent words are written with uppercase first character.

data types

int (integer) float(decimal)

int:

integer

str:

string

input function:

variable = input(prompt) name = input('What is your name? ')

string literal:

when a string appears in actual code of a program.

A logic error is ______:

A logic error is a mistake that does not prevent the program from running, but causes it to produce incorrect results.

can you use double and single quotes in string literals? True or False.

True.

flowchart:

a diagram that graphically depicts the steps that take place in a program.

string:

a sequence of characters that is used as data.

float:

decimal

variable naming rules ______:

- you cannot use one of python's key words as a variable name - a variable cannot contain a space - the first character must be one of the letters a - z, A-Z or (underscore) - after the first character you may use the letters a-z, A-Z, or 0-9, or ____(underscores). -upper and lower case characters are distinct.

argument:

the data you want displayed on screen.

garbage collection:

when a value in memory is no longer referenced by a variable, interpreter automatically removes it from memory through Garbage collection.

Designing the program is step ______

Step 1 is when you design the program.

Writing the code is step ______

Step 2 is when you write the code.

What step are logic errors found in of making a program?

Step 3, when you test the program.

Testing the program is step _____

Step 4 is when you test the program.

Correcting logic errors is step _____ in designing a program:

Step 5 is when you correct logic errors.

end-line comment:

a comment that appears at the end of a line of code.

Variable:

a name that represents a value stored in the computer's memory

numeric literal:

a number that is written into a program's code.

function:

a piece of prewritten code that performs an operation.

algorithm:

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

software requirement:

a single task that the program must perform in order to satisfy the customer.

assignment statement:

a variable that references a piece of data.

pseudocode:

fake code; informal language that has no syntax rules and is not meant to be complied or executed.

prompt is _____

prompt is the string that is displayed on the screen.

When do you correct syntax errors in making a program?

step 3, is when you correct syntax errors.

customer:

the person, group or organization that is asking you to write a program.

when a variable references the value:

when a variable represents a value in the computer's memory.

List the 5 phases of developing a program.

1. Design the code. 2. Write the code. 3. Correct Syntax errors. 4. Test the program. 5. Correct logic errors.

flowchart steps:

1. Ovals are terminal symbols (start, end) 2. Parallelograms are input symbols and output symbols - reads input and displays output 3. rectangles are processing symbols. steps in which the program performs some process on data, math calculation.


Kaugnay na mga set ng pag-aaral

Ellis & Associates Lifeguard Training Vocabulary

View Set

Chapter 38: Assessment of Digestive and Gastrointestinal Function

View Set

Chapter 2 - Basics of Real Estate Practice Questions

View Set

Prep U Chapter 34: Assessment and Management of Patients with Inflammatory Rheumatic Disorders

View Set

AP II_21007 Lect_ Chapter 17 Endocrine Sytem _ Tophat

View Set

RUC 1The Evolution of Nursing chap. 1

View Set