ECS 10 Chapter Notes - Chapter 3: Local Variable

181 views2 pages

Document Summary

Function -- a statement which is surrounded by a function call built into python. The function call will execute the statement and return something. (analogous to a question) int() Return value -- the result of a function call. (analogous to an answer) int() can convert values to numbers such as whole numbers or floating-point numbers. As for floating-point numbers, this function will truncate the numbers after the decimal. Floating-point numbers add a decimal and a zero after for whole numbers and can also convert strings to floating-point numbers. Math is an object that holds functions and can be imported with an import statement import math. The functions can be accessed with a period followed by the name of the function math. log10() math. sqrt() A statement including a function can be assigned to a variable x = math. exp(math. log(x+1)) Parameters -- variable or statement in the parenthesis of the function.

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

Related Questions