O'Reilly logo

Sage Beginner's Guide by Craig Finch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - doing calculations with the notebook interface

Now, we will use the Notebook interface to repeat the calculations that we did with the interactive shell. We will add some text to document what we've done.

  1. Define variables.

    The empty white box in the middle of the worksheet is an input cell. Click in the input cell and type in the following text:

    R = 250e3 	# ohms
    C = 4e-6 	# Farads
    tau = R * C
    tau
    
  2. To evaluate the cell, press Shift-Enter or click the evaluate link, which is found just below the bottom-left corner of the input cell. As soon as the code executes, an empty input cell appears on the screen below the previous cell. The screen will look like this:
  3. Perform a calculation.

    You can also insert an empty input cell by moving ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required