INFO I210 Review for Exam 1
Fall, 2012
Version 1.4
Hybrid sections (1474, 1738): The exam is given in the classroom at the regular lab meeting time (2:00 or 5:30) on Wednesday, October 10.
Online section (32015): The exam is given in the IU East Testing Center Tuesday through Thursday, October 9–11. For the Testing Center hours and sign-up instructions, see Oncourse Forums / General Discussion / Exam Schedule for the Online Section.
The exam will cover the Unix Tutorial, through parts 1 and 2, and the textbook, chapters 1–5. It will count for approximately 8% of your course grade, as described in the course syllabus.
The exam time will be 75 minutes.
There will be a mixture of question types, including matching, multiple choice, short answer, code interpretation (show the process or result of executing some code), and writing Python code or Unix commands.
Testing Center
(For the online section)
- Location: Springwood Hall (RW) 202.
- Students must sign up in advance for a test time. To be sure you get a seat, I recommend signing up immmediately. The Testing Center says you should sign up at least 24 hours in advance of the test time.
- Sign up by calling Bob Lang, 765-973-8249, or Vicki Colley, 765-973-8561.
- You must bring your IU student ID, driver's license, or other state ID, when you come to take the exam.
- Additional guidelines for students: please see page 2 of the document in Oncourse Resources, "iue-testing-service.pdf".
Learning Objectives
Here is an explanation of some verbs used in stating the objectives. You may find these verbs on the exam as well.
- To interpret program statements means to look at them and explain what they mean or what they do.
- To apply programming concepts means to be able to write statements that use them to accomplish a task.
- To distinguish between A and B means to describe the differences, which may include their advantages and disadvantages in various situations.
- To compare A and B means to describe the similarities and differences (see "distinguish").
Unix
- Know the two kinds of things that exist in Unix.
- Learn to use the Unix file system. Be able to:
- Distinguish between absolute and relative paths.
- Describe the file system structure, and explain the concepts of home directory, working directory, and parent directory.
- Use the commands
cd, pwd, mkdir, ls, mv, cp, rm.
Chapter 1
Learn to write very simple programs and some graphics. Be able to:
- Explain the terms computer science, informatics, algorithm, program, variable, assignment, function, parameter, argument.
- Distinguish between integer and floating point numbers.
- Recognize valid and most invalid Python identifiers (e.g., names for variables and functions). Of the reserved words list on page 22, you should know
and, def, del, elif, else, for, if, import, in, not, or, return, while.
- Interpret and apply arithmetic operators (
+, -, *, //, /, %, **) and use of parentheses for grouping in expressions.
- Interpret and apply basic turtle graphics commands, including creating a turtle and the methods
forward, backward, right, left, position, heading, goto, for drawing simple geometric shapes.
- Interpret and apply Python functions:
- Defining functions.
- Calling functions.
- Explain how abstraction is related to functions and why it is a good thing.
- Interpret and apply simple looping with the
for statement.
Chapter 2
Learn to process numerical data, to let programs make decisions, and to let programs behave randomly. Know how to:
- Explain the terms module, boolean, Monte Carlo methods, randomness.
- Interpret and apply some of the functions and constants of the
math module, including sqrt, floor, ceil, pi
- Explain Archimedes' method of estimating the value of π.
- Explain, interpret, and apply the accumulator pattern for computing, e.g., sums of terms.
- Interpret and apply the comparison operators
==, !=, >, >=, <, <= and the boolean operators and, or, not.
- Interpret and apply the
if statement, including the two-way if/else and the multi-way if/elif/.../else.
- Interpret and apply the function
random.random.
- Use the Python
help function to view documentation on functions from the math module.
Chapter 3
Learn to process textual (character) data. Be prepared to:
- Explain the terms cryptography, encrypt, decrypt, plain text, cipher text, transposition cipher, substitution cipher, key (for encryption), brute force methods, string, character.
- Interpret and apply Python string operations, including the operators for indexing, slicing, concatenation, repetition; the
len function; and looping through all the characters in a string.
- Interpret and apply the accumulator pattern in processing string data.
- Use the Python
help function to view the documentation on string methods.
- Prompt and read user input using the
input function.
Chapter 4
Learn some important ways of organizing data in computer memory. Be ready to:
- Explain the terms list, dictionary (a collection type), mean, median, mode, range, frequency distribution (table, chart), mutable or immutable object; key, value, and item (in dictionaries)
- Distinguish between data and information.
- Compare the string and list data types.
- Compare the list and dictionary data types.
- Interpret and apply Python list operations, including the list operators for indexing, slicing, concatenation, repetition, membership,
del; the len function; and looping through the elements of a list.
- Compute the mean, median, mode, range, and standard deviation of a list of numbers.
- Use the Python
help function to view the documentation on list methods.
Chapter 5
Learn to process larger collections of data stored on disk or on the web. Since we have not had a lab on this material, the emphasis will be on interpreting, not applying, Python features. Be able to:
- Explain the terms text file, newline character, field, URL, HTML, tag, hypertext, hyperlink, CSV file.
- Distinguish between definite and indefinite iteration or looping.
- Interpret Python file operations:
- Opening a file
- Reading or writing a file
- Iteration with
for line in file:
- File methods
read, readline, readlines, write
- Newline character
'\n'
- Closing a file
- Interpret the
while statement for indefinite iteration.
- Interpret list comprehensions for common list-processing tasks (mapping, filtering)
- Identify the parts of a URL.
- Explain the role of the Python
urllib module.
Sample Test