猫史档案馆


【编程几时休】函数 中

用户:Python新世界Python新世界查看:192 回复:14 评论:17 创建时间:2018-11-03T13:20:54


欢迎收听编程几时休栏目,#¥@#%#¥#¥&……%……&¥……#@!@¥#()(*(……¥{“?》》《¥##@¥#%!#,接下来,我们继续学习函数:

center_image一,返回值:

center_imagecenter_imagecenter_image我举个栗子:center_image
center_image


回复

上一页第 1 页 / 共 1 页下一页
Rougemare初染聊高数Rougemare初染聊高数

为了保持一个教程的专业,请使用英文驼峰命名法

点赞0


评论

what is it


bLockTheBlOcK块块bLockTheBlOcK块块

下面讲递归(大概)
萌新请做好心理准备和,积木准备和学识准备

点赞0


评论


Rougemare初染聊高数Rougemare初染聊高数

如果连驼峰命名法都不知道是啥

点赞0


评论

和咸鱼有啥区别

那你说,这个命名法怎么取名

你说啊,咱们都想脱离咸鱼呢


嗯哼君 渠源嗯哼君 渠源

吐血。

真的是要吐血。

补充一下:驼峰命名法是开头字母小写,之后首字母都大写。由于大小写酷似驼峰,因此得名。

例:helloWorld、iAmHandsome(滑稽)

点赞0


评论

???

这样不仅可以区分每个单词,还可以与class分隔开,因此是最受人们推崇的一种方法。


嗯哼君 渠源嗯哼君 渠源

然而你并没有把返回讲明白啊,mengxin一般都是这样的,不理解这个积木。

简单地说就是函数结束后剩下的你需要的东西,就叫做返回值。返回值可以传递到主模块中继续使用,比如你在函数内运算完成后把结果返回到主模块中,这就叫返回。

点赞0


评论


嗯哼君 渠源嗯哼君 渠源

递归是个很重要的东东,希望能讲好了,谢谢。

比如:

 

def 递归():

       print("嗯哼君最帅了")

       递归()

 

递归()

 

(funny)

点赞0


评论

哦!

e哼君不是这个

这是我函数下要讲的内容

不可剧透

马上就要发了!


Python新世界Python新世界

是不是这个意思,在定义函数中有这个定义函数的积木,也就是不使用重复执行,它也会重复执行喽!

center_image

点赞0


评论

对头得嘞。 一点一点往下推就行了:先开始→说三句话→函数重新开始→说三句话→重新开始······

哦!


嗯哼君 渠源嗯哼君 渠源

总而言之,嗯哼君最帅了!

 

哈哈爱兮爱乎爱乎!

 

······

爱乎呜呼兮呜呼阿呼,

阿呼呜呼兮呜呼呜呼!

(嗯哼君因为太自恋而疯了)

点赞0


评论

还有一个返回值递归,比如n!

哦?

这个函数的突破口在于n!=(n-1)!×n

这不就是三角形的边数转换后的角数吗!!!


钢铁侠昊钢铁侠昊

是的意思就是这样。

点赞0


评论


钢铁侠昊钢铁侠昊

emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_编程猫_厉害了emotion_雷电猴_捂嘴笑emotion_雷电猴_捂嘴笑

点赞0


评论


bLockTheBlOcK块块bLockTheBlOcK块块

你可以直接在积木上右键,生成积木图片,而不需要再抠图。 @0·618

点赞0


评论


bLockTheBlOcK块块bLockTheBlOcK块块

emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗

点赞0


评论


Python新世界Python新世界

emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗emotion_编程猫_在吗

点赞0


评论


治愈绾兮治愈绾兮

恭喜,你F12的数学运算现在有了()

点赞0


评论