Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Week 01
LS30A LAB 1B/1D
TA: Hao Lee
LA: Evelyn Malamut
About TA
Name: Hao Lee
Major:
Making Iron Man Suit (Robotics)
What I look like?
*Fig. 1: Different versions of Hao (in case any unexpected transformation happens)
About Class
OH:
Mon. 10 AM - 11 AM
Tue. 1 PM - 2 PM
Location: TBA
Login to CoCalc!!
What is CoCalc
A platform to use SAGE
Online system, no environment setup is needed!
Why use SAGE?
Simplified version of Python
More math-friendly
Example (You don't need to know this)
How to plot sin(t)?
In python
In CoCalc (SAGE)
SAGE is much simplier
How to use CoCalc?
Mach Operations
Plus: +
Minus: -
Multiply: *
Division: /
Things need to be evaluate first: (put it inside the parentheses)
Shortcut Commands!
Shift + Enter (Run this cell!)
Alt + Enter (Run this cell and create an empty cell!)
Fractions and Decimal Numbers
The default display format is fraction, but sometimes we prefer decimal numbers (easier to compare)
Just put a dot next to the number!
Variables
Assign/Save Values
"=" has different meaning in programming, it means "assigning the value on the right to the variable on the left"
Functions
"Tasks we can do it again and again!!!"
Syntax of a Function:
Build-in Functions
Self-defined Functions
Consider define a function:
Nothing is process in the above function definition!
If you want to use it, you need to Call the function.
Plot the Data
Sometimes we prefer to visualize the data
e.g., plot
options are really "optional", you can leave it blank but still plot