CMPSC 132 Exam 1(Errorless answers)
interpreter correct answers reads high level program and executes it; processed by alternating reading lines and executing instructions compiler correct answers reads all program lines before beginning to execute code (this does not exist in Python to keep debugging fast) shell correct answers type Python expressions here, and the interpreter will immediately show the results program mode correct answers write an entire program by placing lines of Python instructions in a file and then use the interpreter to execute the contents of the file as a whole identifier correct answers name used to identify a variable, function, class, module, etc. Case-sensitive and cannot contain punctuation mutable correct answers object that can be altered in place immutable correct answers object that cannot be changed in place append correct answers function that modifies the original list concatenation correct answers function that creates an entirely new list break correct answers function that terminates execution of a while or for loop continue correct answers function that immediately skips the processing of the rest of the body of the loop for the current iteration aliasing correct answers occurs when two or more variables reference the same object debugging correct answers locating and correcting code errors in a computer program version control correct answers used to reset software to a known state during debugging, and explore recent changes that might be responsible for bugs hanging correct answers program stops and seems to be doing nothing (infinite loop/recursion) TypeError correct answers error that occurs when trying to use a value improperly KeyError correct answers error that occurs when trying to access an element of a dictionary using a key that does not exist
Document information
- Uploaded on
- May 29, 2024
- Number of pages
- 3
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers