ubuntu2004
Kernel: Python 3 (system-wide)
COSC 130 - Homework 0
Kyle Anderson
Part 1: Arithmetic Operations
In this section of the assignment, we will demonstrate the following concepts:
Addition
Subtraction
Multiplication
Division
Exponentiation
In [1]:
Out[1]:
9
In [2]:
Out[2]:
5
In [3]:
Out[3]:
14
In [4]:
Out[4]:
3.5
In [5]:
Out[5]:
49
Part 2: Variables
In this section of the assignment, we will demonstrate the following concepts:
Creating variables
Printing the value of variables
Operations with variables
Nonlinear execution in notebooks
In [6]:
In [7]:
In [8]:
Out[8]:
42
In [9]:
In [10]:
Out[10]:
7
In [11]:
Out[11]:
6.0
Part 3: Comments
In this section of the assignment, we will demonstrate the following concepts:
Writing comments
Using comments to document code
Using comments to disable lines of code
In [12]:
Out[12]:
7
In [13]:
Out[13]:
2937.54
In [14]:
Out[14]:
2.0
3.0
Part 4: Strings
In this section of the assignment, we will demonstate the following concepts:
Creating strings
Storing strings in variables
Printing multiple items
In [15]:
Out[15]:
Hello, world!
In [16]:
Out[16]:
Robbie Beane
In [17]:
Out[17]:
Hello, my name is Robbie Beane
In [18]:
Out[18]:
Hell, my name is Robbie Beane.