×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

by: Eunice

39

0

2

# CS 1110, Week 14 Notes CS 1110-002

Eunice
Cornell

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

Object Oriented Programming, Inheritance Data Visualization (pyplot, numpy and arrays)
COURSE
Intro to Computing using Python
PROF.
Lee, Van Loan
TYPE
Class Notes
PAGES
2
WORDS
CONCEPTS
CS, Python
KARMA
25 ?

## Popular in ComputerScienence

This 2 page Class Notes was uploaded by Eunice on Friday May 6, 2016. The Class Notes belongs to CS 1110-002 at Cornell University taught by Lee, Van Loan in Spring 2016. Since its upload, it has received 39 views. For similar materials see Intro to Computing using Python in ComputerScienence at Cornell University.

×

## Reviews for CS 1110, Week 14 Notes

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 05/06/16
CS 1110 Van Loan and Lee Spring 2016 May 3, 2016  Object-Oriented Programming (OOP) o see ThinkPython chapter 18 o examples used involve playing cards  decks vs. hands  can do certain things with both but also some methods won’t be shared o def __str__(self)  a special method that “pretty prints” o Inheritance  in defining a class instead of having “class Child(object)”  if you have “class Child(Parent)” the new class (Child) inherits, or is able to use all the methods from the other class (Parent)  any method from Parent that is redefined in Child is overridden by the new definition  in using Child class, you can use methods defined in the Parent class and apply it (it has been inherited) May 5, 2016  Probability o of a full house in a hand  5 card hand: two of one rank, three of another  Data Visualization o how to define a useful class for manipulating (for ex.) sunrise/sunset data o how to graphically display facts about that data using numpy and pyplot  pyplot allows you to easily graph  numpy arrays  within numpy, there’s an array type o you can add, subtract, multiply, divide arrays  requires same length  1-dimensional array basics o example of 3 element 1d array: o from numpy import * o x = array([1,2,3])  built in linspace function o can’t be used on a python list, can be used in an numpy array  2d arrays in python o first index, second index  in a list of lists, the first indicates the list item and the second indicates the item in the list item  in a 2d array, it’s like row and column o A = array ((3,3))  python sets aside a 3 by 3 array space  pylab

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Bentley McCaw University of Florida

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Janice Dongeun University of Washington

#### "I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Steve Martinelli UC Los Angeles

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com