ITI 1120 Chapter 7: ITI1120 - Chapter 7

53 views2 pages

Document Summary

We"ve seen a lot of functions: built-in-functions, functions inside modules, and functions that we"ve defined. A method is another kind of function that is attached to a particular type. There are str methods, int methods, bool methods, and more - every type has its own set of methods: well explore hoe to use methods and how they differ from the rest of the functions. Module is a kind of object one that can contain function and other variables. There is another type of object that is similar called class. You"ve been using classes all along, probably without realizing it: a class is how python represents a type. We cal call str to create a string ex) str(17) "17". We can also use str to call a method in class str. Every method in class str requires a string as its first argument.

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