# function # def printinfo(): # print("--------------------------") #
print("---- Life is short , I use python-----") # print("--------------------------") # Function call #
printinfo() # printinfo() # Function of parameter # def add2Num(a,b): # c=a+b # print(c) # #
add2Num(11,13) # Function with return value # def add2Num(a,b): # return a+b # # #
print(add2Num(11,25)) # # result = add2Num(11,25) # print(result) # Function that returns multiple values #
def divid(a,b): # shang=a/b # yushu=a%b # return shang,yushu # Multiple return values are separated by commas # #
sh,yu=divid(5,2) # Multiple values are required to save the returned content # # print(" merchant :%d, remainder :%d"%(sh,yu)) def
printapp(a,b,c): result=a+b+c print(result/3) printapp(3,4,5)

Technology
©2019-2020 Toolsou All rights reserved,
【C++ Must see for entry 】C++ from 0 reach 1 Introductory programming axios Interceptor packaging and use Spring Boot Interview must ask : Automatic configuration principle VMware 16 install centos 7 Detailed tutorial C Language data structure - Sequence table delete duplicates V2.0.0 The 12th Blue Bridge Cup c++b Group personal problem solving On sending data from serial port single chip microcomputer to upper computer centos7 install RabbitMqjava Polymorphic array of opencv-python Fourier transform and inverse transform