python midterm; topics with a * will not be tested): Data Types. What does it mean for an object to have a specific type? int, float str list, tuple dict, set type conversions prim... python midterm; topics with a * will not be tested): Data Types. What does it mean for an object to have a specific type? int, float str list, tuple dict, set type conversions primitive vs. reference types mutable vs. immutable types Variables Namespace. Variable naming rules and conventions. Variable assignments with = == vs. is Expressions vs. statements print and input function Control structures: boolean expressions (including comparisons, ==, >, >=, <, <=, and boolean operators and, or, not) if-statements if, elif, ..., else nested if statements while loops Terminating condition, loop variable, making progress toward the terminating case. Nested while loops. break and continue. for loops iterating over an iterable (such as a list, tuple, string, or file). range function. Different ways of iterating over a list using for loops or while loops. Strings different ways of writing string literals nonprinting characters \t and \n indexing, slicing * checking for substrings with in .split and .join methods * unicode representation. (ord and chr) *encodings (UTF-8, ASCII) Files Text files vs. binary files. Paths, filenames, file extensions. Opening textfiles with the open(..., 'r') function. Reading from textfiles line-by-line readline function -- this usually goes with a while loop while line != '') for-loop (usually you don't want to use readline() here) read() function .close() method. reading data from a text file in CSV format. * csv.reader() Lists: Length of a list. Indexing Slicing (including steps and reverse slicing). li[::-1] Nested Lists. [1,2,[3,4, [5,6]],7,[8,9]] Multiple ways of referring to a list (and referring to the same list object multiple times) Appending to lists. .append * Some other list methods we encountered: .index(), .sort() Checking for membership with in Tuples: packing, unpacking immutability Dictionaries: Dictionaries are collections of key/value pairs. Keys are unique and immutable, values do not have to be unique. Looking up values by key. d[key] Setting the value for a key. d[key] = value Checking if a key is in the dictionary. Iterating over the keys, values, or key/value pairs of a dictionary. * Hashing Sets: Set literals adding to sets, checking for membership set intersection, union, difference, symmetric difference Functions: Function definitions with def. Parameters. Function calls. Passing arguments to the parameters. Function calls are expressions! Return statements, return value of a function. Local variables (shadowing, nested name-space and scoping rules (*) Call by object (passing a mutable object to a function). (*)

Understand the Problem

The question is asking for a comprehensive overview of topics that will be covered on a Python midterm exam. It lists various concepts related to Python such as data types, control structures, strings, files, lists, tuples, dictionaries, sets, and functions, along with rules and examples. It also indicates which topics will not be tested with an asterisk.

Answer

The midterm topics not covered are marked with asterisks (*) and include: unicode representation, encodings (UTF-8, ASCII), and csv.reader().
Answer for screen readers

More Information

In Python, topics that won't be tested on the midterm are denoted with asterisks. It's important to focus only on the unmarked topics as detailed in the syllabus or test outline.

AI-generated content may contain errors. Please verify critical information

Thank you for voting!
Use Quizgecko on...
Browser
Browser