Description: Description: Description: Description: Description: Description: Description: Description: Breaking News! Click here for details.

 CSC 131 - Introduction to Computer Science

Midterm 1 Study Guide

The actual exam will be a subset of below:

WRITTEN PROBLEMS

1.     Chapter 1: Vocabulary Words: abstraction, algorithm, binary and decimal representations, integrated circuits, transistors, central processing unit, main memory, RAM, secondary memory, buses, Moore’s Law, bits, bytes, syntax, semantics, Python shell, compiler, interpreter.

2.     Chapter 1: Limits of computation.  What examples does the book give for problems that are intractable?  Why are they intractable?

3.     Chapter 1: Be able to carry out the instructions of an algorithm like determining the day of the week of a particular date.

4.     Chapter 1: Be able to convert a smallish binary number to decimal.  Be able to convert a smallish decimal number to binary.

5.     Chapter 1: Be able to identify whether an error in a segment of Python code is a syntax error or a semantic error.

6.     Chapter 1: Know the four steps of computational problem solving as presented in Figure 1-22.

7.     Chapter 1: Know how to import libraries from the Python Standard Library.

8.     Chapter 1: Know the syntax for using the input statement to get user input.

 

9.     Chapter 2: Vocabulary: Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte, Exabyte, Zettabyte, integer, floating point, ASCII, Unicode.

10. Chapter 2: Understand the limits of floating point representations both in terms of the sizes of what is representable as well as the problem that repeating fractions and irrationals cannot be represented perfectly.

11. Chapter 2: Know the syntax of the format function in regards to floating points and integers.

12. Chapter 2: Understand what the empty string is.

13. Chapter 2: Understand how individual characters are encoded.  

14. Chapter 2: Know what the ord() and chr() functions do.

15. Chapter 2: Be able to identify valid and invalid identifiers.

16.  Chapter 2: Know how all of the mathematical operators work in Python, particularly /, //, and %.

17. Chapter 2: Understand the order of precedence for mathematical operators. 

18. Chapter 2: Know how to convert integers to floats, floats to integers, strings to integers or floats, and floats and integers to strings.   

 

19. Chapter 3: Vocabulary: Sequential, selection and iterative control, Boolean values, definite and indefinite loops, infinite loops.

20. Chapter 3: Know all of the relational operators in Python.

21. Chapter 3: Understand the membership “in” operator in Python.

22. Chapter 3: Know the Boolean operators: and, or, and not.

23. Chapter 3: Know how if-else and if-elif-else statements work.

24. Chapter 3: Be able to trace code with single while loops.

25. Chapter 3: Be able to trace code with single while loops with embedded if-statements.

 

26. Chapter 4.3.2: Be able to trace code using a for loop and the range function.

 

27. Chapter 8: Know the difference between a text file and a binary file.

28. Chapter 8: Know how to open a file for reading or writing.

29. Chapter 8: Know how to read lines from a file either using the readline() function or using a for loop. 

30. Chapter 8: Know how to write to a file.

31. Chapter 8: Know why it is important to close a file.

32. Chapter 8: Know some important and common string functions: isupper, islower, upper, lower, isalpha, isdigit, find, replace, strip, split.

 

You may bring in 1-sheet of paper (8 ˝ x 11 inches) with whatever notes you want on it.   Otherwise, this written test is not open book nor open-internet.  

 

PROGRAMMING PROBLEMS

1.     Implementation: Write a Python program of similar complexity and operations to Problem 1 of Homework 2.

 

2.     Implementation: Write Python program of similar complexity to implementing the algorithm to compute the day of the week given the date. 

 

3.     Implementation: Write a Python program of similar complexity to making change. (Problem 2 of Homework 3)

 

4.     Implementation: Write a Python program of similar complexity to Problem 1 of Homework 4.

 

5.     Implementation: Write a Python program of similar complexity to Problem 2 of Homework 4.

 

6.     Implementation: Write a Python program of similar complexity to Problem 1 of Homework 5.

 

7.     Implementation: Write a Python program of similar complexity to Problem 1 of Homework 5.

 

You may bring in 1-sheet of paper (8 ˝ x 11 inches) with whatever notes you want on it.   You may use your textbook (either paper or electronic version).  However, you may not use any other internet resources.   No internet searching!