CSC180H1 Lecture Notes - Lecture 9: Modular Form, Divisor, Software Engineering

17 views4 pages
27 May 2019
School
Course

Document Summary

You"ve already encountered functions at the very beginning of the course. A function is a self-contained "black box" that: * returns the result of those operations via the output. By allowing the programmer to define functions, python thus enables you to extend the language to implement, in a convenient modular form, arbitrary functional building blocks. Recall, in exercise one, we asked you to define a function called "square" that, surprisingly, returns the square of its argument. * "def" is used to begin the definition. * "square" is provided as a user-defined name. * the function square will take one argument, which we will refer to as "x" within the body of the function. * by "body" of the function, we refer to all of the code that is indented underneath the "def" keyword. * once defined as above, the python interpreter will now.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents