1
h00
CCS CS20 S18
Name:
(as it would appear on official course roster)
Umail address: @umail.ucsb.edu
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 Tue 04/17 12:30PM Wed 04/18 12:00PM

You may collaborate on this homework with AT MOST one person, an optional "homework buddy".

This assignment should be submitted by scanning the pages in the correct order to a PDF file and uploading to gradescope.com.

For more information, visit ucsb-cs8.github.io and look for Gradescope: Student Self Submission under "topics".

Even though it is a Gradescope submission, nevertheless, *please fill in the information at the top of this homework sheet*, including your name and umail address.


READING ASSIGNMENT

Please read Chapter 1 in Perkovic. Then complete these problems.

  1. (10 pts) These 10 points are for filling in your name at the top of the sheet, and scanning correctly on Gradescope. (Having these here gives me a place to give you feedback if there is some glitch with the way you are doing it.)

  2. 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.
    1. (5 pts) What is the relationship between a model and an algorithm?
    2. (5 pts) What is the relationship between an algorithm and a program?
  3. (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.?

  4. Continuing with questions from Section 1.2:
    1. (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?
    2. (10 pts) What is the advantage of putting those features into libraries rather than into the core?
    3. (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?
  5. Section 1.3 describes the Python programming language.
    1. (10 pts) What is the interactive shell used for?
    2. (10 pts) What does a Python program consist of?
  6. 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.

    1. (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.
    2. (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.