01: Intro

Estimated time to complete: about three hours (or likely under an hour, if you’re already familiar with the Edlab, with Python, and with Gradescope)

This introductory assignment exists primarily to make sure you can write and run Python programs, that you can log into the Edlab, and that you can make submissions through Gradescope.

Logging into Gradescope

If you are not already signed up to use Gradescope for this course, go to the Gradescope web site (https://gradescope.com/) and sign up using the email address that you have listed in SPIRE. When you sign up in Gradescope, you’ll need a course entry code. Ours is on the course Moodle page.

Do not wait until the due date to start this process. If the Gradescope site tells you it does not recognize your email address, you should contact the course staff immediately to create an account for you. “I added the course late and didn’t know I needed to ask for a Gradescope account”, “I forgot my Gradescope password” and the like will not be accepted as an excuse for not submitting this or any other assignment on time.

Logging into the Edlab

If you are not a UMass Computer Science student, the Edlab may be foreign to you. Use the username and password system we discussed in class (I won’t post it online). If you added the course late, it may take a day or so from when you added to be live. If you are a Five College student, it may take an additional day. Again, do not wait until the due date to start this process. (Though note: it may not be ready on the first day of classes. Don’t start to panic until Monday the 28th or so.)

The assignment

If you are unfamiliar with Python, I strongly suggest you work through the Python 3 tutorial (I suggest at least through Section 8; we won’t be using Python’s classes so that’s a good place to stop). It is linked to the top level Python 3.7 documentation. If you know Java and/or at least one other scripting language, you should be able to get through this in a couple hours. You could also do the accelerated version at Learn X in Y minutes.

If you are familiar with Python 2 but new to Python 3, you will want to read over (at least) the “Common Stumbling Blocks” described in What’s New in Python 3.0.

Python 3.5 is installed on the Edlab as python3; I’ve asked them to updated to Python 3.7, but for most of what we do the differences will be nonexistent. You will almost certainly want to install Python on your local machine. On Windows, I’ve heard using Anaconda is helpful. On OS X, you could use Homebrew or MacPorts. If you’re using Linux, I suggest you use your distribution’s package manager. But it’s up to you.

You may also want to fiddle around with installing IPython (a better interactive shell for Python than the default interpreter), Jupyter (a browser-based interactive programming environment for Python and many other languages), PyDev (an Eclipse plugin for Python development), and/or PyCharm (a Python IDE from the same people who make the IntelliJ IDEA). I’ve also heard Spyder is good, but I’ve never used it.

Finally, download the following file and expand it: 01-intro.zip

It contains a couple of Python files, intro.py and test_intro.py. The former is a skeleton of Python code I’d like you to complete for this assignment. The latter is a small set of unit tests to help you verify you’ve done things correctly. Read the comments in intro.py for an overview of what to do.

What to submit

When you’re done, upload the intro.py file to the appropriate Gradescope item.