Introduction

Materials

You can find an interactive set of files here.

If the link above doesn’t work, you can find the files here. Clicking on this icon Binder should launch an interactive session.

Computer functions can take many things besides numbers as input and do many things besides return numbers as output. The print function is very useful. Provided with text or variables, it will output things to the screen.

estimate = 20
print('My estimate: ', estimate)

> My estimate: 20

Jupyter Concepts

  • Markup and Markdown
  • Markup and LaTeX
  • Python
  • Jupyter

Jupyter

  • Jupyter is like a word processor and spreadsheet in one program
  • By mixing words and computations together, you can clearly explain your approach to an estimation
  • It has blocks or cells of text that are sent to the program of your choice to be interpreted
  • Markdown: our word processor
  • Python: our spreadsheet or computation program
  • You press shift-enter to evaluate a cell

Markdown

  • You can think of this as a word processor
  • By selecting markdown as the type of cell, jupyter sends the text to markdown to be interpreted
  • Special characters are use to tell the computer to make headings or bold characters

LaTeX

  • This is a word processor especially for math
  • By placing dollar signs ($) around some text, it is sent to LaTeX to be interpreted
  • You can use this to write fractions and many other mathematical symbols
  • You can find some symbols at this link

For example

\frac{1}{2}

will turn into

\frac{1}{2}

SageMathCloud

We use SageMathCloud to provide an easy-to-use platform for our computations

  • Create an account at Sage Math Cloud

  • Use your nice_person@sonoma.edu email address

  • We will add you to our class

  • You will be able to access class content and various tools

Types

The computer uses ones and zeros to represent all data. Anything stored on the computer, a poem, a photo, or a number, is represented using ones and zeros. In order to correctly interpret the ones and zeros the computer needs to know what you are storing.

Integers

These are the counting numbers. No fractions, no decimals.

Floats

These are numbers with a fractional part. If you think you are using floats but are using integers, you may get strange results like one divided by two equals zero.

Floating Point Example Link

Strings

This is how the computer stores words.

ASCII Example Link

Dates and Times

Sometimes the computer stores numbers that represent dates and times. These formats can be subtle, so be sure you know how they work when using them.

Typesetting Math

  • LaTeX is a word processor especially for math
  • By placing dollar signs ($) around some text, it is sent to LaTeX to be interpreted
  • You can use this to write fractions and many other mathematical symbols
  • You can find some symbols at this link

For example

\frac{1}{2}

will turn into

\frac{1}{2}

Numerical Computing Environment

  • Matlab
  • Scientific Python
  • Julia
  • Sage Math Cloud

Materials

You can find an interactive set of files here.

If the link above doesn’t work, you can find the files here. Clicking on this icon Binder should launch an interactive session.