CSC 498 Lecture Notes - Lecture 5: Tuple, Immutable Object, Function Object

28 views42 pages

Document Summary

Indent 4 spaces after: call/run/use the function by its name and pass arguments, signature of a function: function name, parameters and returns. Function arguments: you can use keyword arguments when calling a function to make the order you pass arguments not matter. That is why when we iterate over the kwargs there doesn"t seem to be any order in which they were printed out: example: one function to handle calculating area of different shapes. Static typing: crash a function using unsupported types of arguments, we do not need to specify the type of a parameter. List data type: a list is a sequence of objects. List methods: list methods: functions that belong to list objects, python has many functions associated with list objects, these functions are called list methods, list methods may modify the original list because a list is mutable.

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