Final Exam Chapter 3 and 4 Flashcards
What is code bloat
have more code in your program than you actually need
What i the difference between copy code and reuse code
Copy code is duplicated code, reuse code is a single code that you can call on
What is a function
A function is a chunk of code that you separate out from the rest of your program,
When you use the the return( ) command it does what?
It send a data value back to the calling code.
What happens if the function omits the return( ) command?
it gives you something because it prints the current price on screen
Parameters are variables that
you can pass to functions.
Computers use stack frames to
Record and track variables.
When you call a function
a new stack frame is created for the function to use.
Stack frames (and local variables) are
thrown away when you exit a function.
A variable is said to be “in scope”
whenever its value can be seen by some code.
The call to open( ) creates a
file handle that creates and adds texted to a file
What is a file?
reading data stored on disk
What is an array?
a collection variable that holds multiple data items that can be accessed by index
What is sorting?
arranging a collection in a specific order
What is open ( )
open a file for processing