Python full stack day14 (function)

Source: Internet
Author: User

Math-Defined Functions

The definition of a function: given a set of numbers a, a corresponding rule F is applied to a, recorded as F (a), to obtain another set of B, that is, b=f (a). Then the relation is called the function relation, short function. The concept of a function contains three elements: define domain A, range C, and corresponding law F. The core is the corresponding law F, which is the essential feature of the function relationship.

Python-defined functions

def test (x):    # "comment"    x + = 1    return X#def: Defines the function's keyword #test function name # (within definable parameters) #注释 (not necessarily but strongly recommended to add descriptive information) #x + = 1 processing Logic # return definition returns value # Call run can take parameters or without parameters

  

Python full stack day14 (function)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.