Created
September 15, 2015 21:12
-
-
Save benjic/1eb83039d3944617be66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:ad25b145c2506fed4feb9edf99d88b47ccc8c45c8a88da65889314d57a6ba7d8" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "collapsed": false, | |
| "input": [ | |
| "# Introduction to Python Assignment\n", | |
| "# PHSX216N Physics Lab I\n", | |
| "# Ben Campbell <[email protected]\n", | |
| "\n", | |
| "import numpy as np\n", | |
| "\n", | |
| "x = np.array([14.5, 32.6, 42.1, 65.23, 5.9])\n", | |
| "y = np.array([2.0, 3.0, 8.5, 58.36, 4.22])\n", | |
| "\n", | |
| "# Print out the answers to the following operations:\n", | |
| "# x*y, x + 2*y, 0.5*x*y2\n", | |
| "print(x*y)\n", | |
| "print(x + 2*y)\n", | |
| "print(0.5*x*y**2)" | |
| ], | |
| "language": "python", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "output_type": "stream", | |
| "stream": "stdout", | |
| "text": [ | |
| "[ 29. 97.8 357.85 3806.8228 24.898 ]\n", | |
| "[ 18.5 38.6 59.1 181.95 14.34]\n", | |
| "[ 2.90000000e+01 1.46700000e+02 1.52086250e+03 1.11083089e+05\n", | |
| " 5.25347800e+01]\n" | |
| ] | |
| } | |
| ], | |
| "prompt_number": 1 | |
| }, | |
| { | |
| "cell_type": "code", | |
| "collapsed": false, | |
| "input": [], | |
| "language": "python", | |
| "metadata": {}, | |
| "outputs": [] | |
| } | |
| ], | |
| "metadata": {} | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment