Final Exam Notes PDF - Python Programming

Summary

These are final exam notes focusing on Python programming concepts, based on the text "Starting out with Python" by Tony Gaddis, class discussions, and supplemental materials. The notes cover a range of topics including program structure, terminology, control and repetition structures, file processing and exception handling. The exam consists of True/False and Multiple-Choice questions.

Full Transcript

FINAL EXAM NOTES OVERVIEW The final exam is comprised of a combination of 100 True/False and Multiple-Choice questions. Some of the questions require you to read and interpret code. Programming is by nature cumulative in that new ideas build upon previous concepts. The final exam will focus on the...

FINAL EXAM NOTES OVERVIEW The final exam is comprised of a combination of 100 True/False and Multiple-Choice questions. Some of the questions require you to read and interpret code. Programming is by nature cumulative in that new ideas build upon previous concepts. The final exam will focus on the concepts and ideas discussed in the text “Starting out with Python” by Tony Gaddis. In addition to the text, the scope of the exam includes material presented in class discussion, supplemental material made available by the instructor, and subject matter presented by student teams. This is a closed book, closed note exam. You are allowed one sheet of blank paper. At the end of the exam, the sheet of paper must be turned in with your name on the top left corner of the paper. No other aides of any kind are allowed when taking the exam. CONCEPTS PROPER PROGRAM STRUCTURE Modular program structure Variable naming rules Indention Comments Functions and Methods Various operators and their use TERMINOLOGY AD KEY CONCEPTS FROM EACH CHAPTER Terminology will be used in questions on the exam and may be the focal point of some questions GENERAL TOPICS How memory is used to store information Console input and output o Formatting as discussed in class o Escape characters Working knowledge of Python’s built in functions as presented in class, text, and supplemental material Various forms of control structures Various forms of sequence structures How Boolean logic works DECISION STRUCTURES Various types of if, if/else, if/elif/else String comparison REPETITION STRUCTURES “for” – and its forms discussed in class, text, and supplemental material “while” Infinite loops and loop control Sentinels, what they’re used for and when to use them Flags, what they are used for and how they differ from sentinels Input validation loops as presented in class, text and supplemental material Nested loops FUNCTIONS AND MODULAR PROGRAMMING Benefits, proper structure Why they are useful How to structure them Use of modules Return values from a function and how to use the value returned Local and Global variables Passing arguments to a function Difference between arguments and parameters Parameter value and scope FILE PROCESSING Types of files File Access Modes Filenames and File objects Opening, processing and closing files Logical record processing, use of “\n” Using loops with file processing Detecting the end of the file with a loop EXCEPTION HANDLING How to structure a try suite Handling built-in exceptions Common built-in exceptions Handling multiple exceptions Proper use of all the various possible clauses used in a try suite LISTS AND TUPLES What they are and what they’re used for, differences Defining and also the use of the repetition operator Indexing Associated built-in methods and functions 2 Single dimension only, not multi-dimension Concatenation, slicing and copying Searching and manipulation STRINGS Immutable Iterating over a string Concatenation, slicing, splitting Associated built-in methods and functions 3