To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 20 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1

Homework 0: test

Submission by: Alice Doe (alice@mit.edu)

👀 Reading hidden code
36.9 ms
👀 Reading hidden code
student = (name="Alice Doe", email="alice@mit.edu", number=1)
17.6 μs
👀 Reading hidden code
61.2 μs
👀 Reading hidden code
73.7 μs

Exercise 1

Give a number larger than 100:

👀 Reading hidden code
235 μs
200
👀 Reading hidden code
big_number = 200

# well done!
11.1 μs
👀 Reading hidden code
61.6 μs

Exercise 2

Write a function that checks whether a number is positive:

👀 Reading hidden code
214 μs
ispositive (generic function with 1 method)
👀 Reading hidden code
function ispositive(x)
return x > -1
end
370 μs
👀 Reading hidden code
75.3 μs
👀 Reading hidden code
59.7 μs