CSC148H1 Lecture Notes - Lecture 1: Docstring, Init

171 views1 pages
3 Feb 2016
School
Course
Professor
katrinasavvy and 38715 others unlocked
CSC148H1 Full Course Notes
1
CSC148H1 Full Course Notes
Verified Note
1 document

Document Summary

The first 30 min the professor talked about the course and discussed the syllabus with the class. If two objects are the same they should have the same address if address does not appear to be the same, we know we have a different object. Everything in python is a class, (i. e. databases) However, if you want to create a different attribute. Index is a method or object under the class. When we create a class we need to think whether we want to create a variable or not. Implement the class: body of special methods _ init_,_eq_,and _str, body of other methods, testing (more on this time) Although python as a build-in type for floating point numbers, there is no built in type for representing rational numbers: Rational numbers are rations of two integers/q. where p is called the numerator and q is called the denominator. Operations on rational fractions include addition, multiplication and comparison.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents