CISC106 Study Guide - Final Guide: Code Reuse, Local Variable, If And Only If

65 views10 pages

Document Summary

Function: group of statements within a program that perform a specific task. Functions can be executed in order to perform overall program task. Known as divide and conquer approach: modularized program: program wherein each task within the program is in its own function (insert drawing of pic on page 2) Code reuse: write the code once and call it multiple times. Void function: simply executes the statements it contains and then terminates. Value returning: executes the statements it contains, and then it returns a value back to the statement that it called. The input, int, and float functions are examples of value-returning functions. Cannot use key words as a function name. First character must be a letter or underscore. All other characters must be a letter, number or underscore. Should be descriptive of the task carried out by the function. Includes keyword def and function name, followed by parentheses and colon.

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

Related Documents