hw02.pdf - hw02 April 26, 2020 [1]: # Initialize OK from...

This preview shows page 1 - 3 out of 32 pages.

The preview shows page 1 - 3 out of 32 pages.
hw02April 26, 2020[1]:# Initialize OKfromclient.api.notebookimportNotebookok=Notebook('hw02.ok')=====================================================================Assignment: Homework 2: Arrays and TablesOK, version v1.12.5=====================================================================1Homework 2: Arrays and Tables[2]:# Don't change this cell; just run it.# When you log-in please hit return (not shift + return) after typing in your,emailimportnumpyasnpfromdatascienceimport*_=ok.auth(inline=True)Successfully logged in as [email protected]Recommended Reading: *Data Types*Sequences*TablesPlease complete this notebook by filling in the cells provided.Before you begin, execute thefollowing cell to load the provided tests. Each time you start your server, you will need to executethis cell again to load the tests.This assignment is due Thursday, February 6 at 11:59 P.M. You will receive an early submissionbonus point if you turn in your final submission by Wednesday, February 5 at 11:59 P.M. Late workwill not be accepted as per thepoliciesof this course.Start early so that you can come to office hours if you’re stuck. Check the website for theofficehours schedule.Throughout this homework and all future ones, please be sure to not re-assign variables throughoutthe notebook! For example, if you usemax_temperaturein your answer to one question, do notreassign it later on.1
Important: In this homework, theoktests will tell you whether your answer is correct, except forParts 4, 5 & 6. In future homework assignments, correctness tests will typically not be provided.Before continuing the assignment, select ”Save and Checkpoint” in the File menu and then executethe submit cell below. The result will contain a link that you can use to check that your assignmenthas been submitted successfully. If you submit more than once before the deadline, we will onlygrade your final submission. If you mistakenly submit the wrong one, you can head to okpy.organd flag the correct version. There will be another submit cell at the end of the assignment whenyou finish![3]:# When you log-in please hit return (not shift + return) after typing in your,email_=ok.submit()<IPython.core.display.Javascript object><IPython.core.display.Javascript object>Saving notebook… Saved 'hw02.ipynb'.Submit… 100% completeSubmission successful for user: [email protected]URL: 1.11. Creating ArraysQuestion 1.Make an array calledweird_numberscontaining the following numbers (in the givenorder):1. -22. the sine of 1.23. 34. 5 to the power of the cosine of 1.2Hint:sinandcosare functions in themathmodule.Note:Python lists are different/behave differently than numpy arrays. In Data 8, we use numpyarrays, so please make anarray, not a python list.[6]:# Our solution involved one extra line of code before creating# weird_numbers.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 32 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
World population, Most recent common ancestor, Defined and undefined

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture