You should see something like this minus our annotations The last line of the

You should see something like this minus our

This preview shows page 3 - 5 out of 18 pages.

You should see something like this (minus our annotations): The last line of the error output attempts to tell you what went wrong. The syntax of a language is its structure, and this SyntaxError tells you that you have created an illegal structure. " EOF " means "end of file," so the message is saying Python expected you to write something more (in this case, a right parenthesis) before finishing the cell. There’s a lot of terminology in programming languages, but you don’t need to know it all in order to program effectively. If you see a cryptic message like this, you can often get by without deciphering it. (Of course, if you’re frustrated, ask a neighbor or a TA for help.) Try to fix the code above so that you can run the cell and see the intended message instead of an error. 3
Image of page 3
2.5 1.5. The Kernel The kernel is a program that executes the code inside your notebook and outputs the results. In the top right of your window, you can see a circle that indicates the status of your kernel. If the circle is empty (), the kernel is idle and ready to execute code. If the circle is filled in (), the kernel is busy running some code. You may run into problems where your kernel is stuck for an excessive amount of time, your notebook is very slow and unresponsive, or your kernel loses its connection. If this happens, try the following steps: 1. At the top of your screen, click Kernel , then Interrupt . 2. If that doesn’t help, click Kernel , then Restart . If you do this, you will have to run your code cells from the start of your notebook up until where you paused your work. 3. If that doesn’t help, restart your server. First, save your work by clicking File at the top left of your screen, then Save and Checkpoint . Next, click Control Panel at the top right. Choose Stop My Server to shut it down, then My Server to start it back up. Then, navigate back to the notebook you were working on. 2.6 1.6. Submitting your work All assignments in the course will be distributed as notebooks like this one, and you will submit your work from the notebook. We will use a system called OK that checks your work and helps you submit. At the top of each assignment, you’ll see a cell like the one below that prompts you to identify yourself. Run it and follow the instructions. Please use your @berkeley.edu address when logging in. In [8]: # Don ' t change this cell; just run it. # The result will give you directions about how to log in to the submission system, cal # Once you ' re logged in, you can run this cell again, but it won ' t ask you who you are # it remembers you. However, you will need to log in once per assignment. from client.api.notebook import Notebook ok = Notebook( ' lab01.ok ' ) _ = ok . auth(inline = True ) ===================================================================== Assignment: Lab 1: Expressions OK, version v1.12.5 ===================================================================== Open the following URL: After logging in, copy the code from the web page and paste it into the box.
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 18 pages?

  • Fall '17
  • Human height

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes