1 |
h00 |
CS8 W19 |
Name: | ||||
---|---|---|---|---|
(as it would appear on official course roster) | ||||
Umail address: | @umail.ucsb.edu | section |
||
Optional: name you wish to be called if different from name above. | ||||
Optional: name of "homework buddy" (leaving this blank signifies "I worked alone" |
h00: Perkovic Ch1 (Introduction to CS)
ready? | assigned | due | points |
---|---|---|---|
true | Thu 01/10 02:00PM | Wed 01/16 09:00AM |
You may collaborate on this homework with AT MOST one person, an optional "homework buddy".
MAY ONLY BE TURNED IN IN THE LECTURE/LAB LISTED ABOVE AS THE DUE DATE,
OR IF APPLICABLE, SUBMITTED ON GRADESCOPE. There is NO MAKEUP for missed assignments;
in place of that, we drop the lowest scores (if you have zeros, those are the lowest scores.)
READING ASSIGNMENT
Please read Chapter 1 in Perkovic. Then complete these problems and turn in your completed homework during your registered lab section.
(10 pts) Please fill in the information at the top of this homework sheet, including your name and umail address. If the other two items apply, please fill them in as well. Please do this every single time you submit homework for this class. It is important to fill in both name and umail every time, since handwriting is sometimes difficult to decipher. Having both helps us ensure you get credit for your work.
DO NOT staple, paper clip, spit-fold-and-tear, or do ANYTHING that would make it difficult to automatically feed your paper through a scanner.
- Section 1.1 describes Computer Science in general. It includes
a passage that distinguishes between models, algorithms and programs.
I'm going to ask two questions about the relationships among these concepts.
In your answer, don't just copy down an exact quote from the textbook;
explain in your own words. If you don't think you understand the relationship,
be honest about that, and write down what you are confused about, or your best guess at what the author is trying to say.
- (5 pts) What is the relationship between a model and an algorithm?
- (5 pts) What is the relationship between an algorithm and a program?
(10 pts) Section 1.2 describes Computer Systems in general. According to our author, why did computer scientists create programming languages such as Python, C, C++, Java, etc.?
- Continuing with questions from Section 1.2:
- (10 pts) The author makes a distinction between the "core set" of features in a programming language, and those that are put into "software libraries". What are two examples of features that end up in libraries rather than in the core language?
- (10 pts) What is the advantage of putting those features into libraries rather than into the core?
- (10 pts) APIs (Application Programming Interfaces) are important in programming—our author gives a nice clear explanation of what an API is. What is that explanation?
- Section 1.3 describes the Python programming language.
- (10 pts) What is the interactive shell used for?
- (10 pts) What does a Python program consist of?
Section 1.4 contains a description of a sample problem that the author uses to illustrate "computational thinking". The author notes that in applying computational thinking to a problem, one of the steps we take is to decide which details of the problem are important, and which are not.
- (10 pts) Give two examples of details about the problem statement that, according to the author's discussion, are not relevant, and should be ignored.
- (10 pts) Give two examples of details that are definitely relevant, and that we need to pay attention to in coming up with a solution.