For Kid's Programming: Common words (Part 2)
29 Feb 2020
I sort out 100 high-frequency words that I use in programming, Python and C++. Here are the second ten.
python
Chinese explanation: 蟒蛇,一种编程语言的名字。
python这个单词直译过来是“蟒蛇”,很多介绍python的书也用各种形象的蟒蛇作为封面,但严格来说这种语言的名字不能叫做蟒蛇。python的创始人Guido van Rossum非常喜欢看英国的超现实戏剧团体Monty Python创作的肥皂剧Monty Python's Flying Circus,把这门语言命名为python是为了纪念Monty Python。
integer
Chinese explanation: 整型、整数,编程语言中一般简写为int。
float
Chinese explanation: 浮动,在编程语言中代表浮点型,用来表示小数。之所以叫做浮点型是和定点型对应的,简言之就是计算机用二进制表示小数时,小数点的位置是根据具体的数字表达而浮动变化的。
string
Chinese explanation: 串,在编程语言中用来表示字符(串),既多个字符串起来,有些语言或标准库用法简写为str。
list / append
Chinese explanation: 清单 / 附加,在python中用来将多个同一类型的数据列入一个清单中。
range
Chinese explanation: 范围,用于在指定范围内构造一组数据。
sum
Chinese explanation: 和,总和,一般用于数字求和。
pass
Chinese explanation: 过,通过,在python中表示什么都不做。
define
Chinese explanation: 限定,下定义,编程语言中用于定义函数或其他抽象,python中简写为def。
return
Chinese explanation: 返回,编程语言中一般用于函数返回最终运算结果。