CP104 Lecture 23: Cp104 lesson 23

23 views2 pages
School
Course
hayjayshay and 38575 others unlocked
CP104 Full Course Notes
2
CP104 Full Course Notes
Verified Note
2 documents

Document Summary

Case 1: a function does not return any values: def function_name ([parameter1[, parameter2, ]]): Return: # function definition must appear before the call o # function is not executed until you call it, function_name ([argument1[, argument2, ]]) Case 2: a function returns a value: def function_name ([parameter1[, parameter2, ]]): Return value: # function definition must appear before the call o # function is not executed until you call it, variable = function_name([argument1[,arg2, ]]) Case 3: a function returns more than one value: def function_name ([parameter1[, parameter2, ]]): Return value1, value2: # function definition must appear before the call o # function is not executed until you call it, var1, var2 = function_name ([arg1[, arg2, ]]) Def main ():

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

Related Questions