代码 — “code” in Mandarin Chinese

dàimǎ · say it: dye4 mah3

code

Used both for computer programming source code and for symbolic identification codes (such as stock tickers, area codes, or product codes).

代 dài substitute; represent+码 mǎ number; symbol; code

countable and uncountable noun

  • Measure words Use 一行代码 [yī háng dàimǎ] for a line of code, 一段代码 [yī duàn dàimǎ] for a snippet/block of code, or 一个代码 [yī gè dàimǎ] for an ID/product code.

One of the 5,000 most common words in Mandarin Chineseⓘ

Hear it in use

他每天都在电脑上写代码。

Tā měitiān dōu zài diànnǎo shàng xiě dàimǎ.

He writes code on the computer every day.

这段代码里有一个错误。

Zhè duàn dàimǎ lǐ yǒu yí ge cuòwù.

There is an error in this piece of code.

请先输入商品的数字代码。

Qǐng xiān shūrù shāngpǐn de shùzì dàimǎ.

Please enter the numeric code of the product first.

How to use it

  • Do not confuse 代码 [dàimǎ] with 密码 [mìmǎ]: 代码 [dàimǎ] is programming source code or an identification symbol, whereas 密码 [mìmǎ] is a secret password or PIN.
  • To say 'to code' or 'to program', pair it with the verb 写 [xiě] (写代码 [xiě dàimǎ]) or the slang verb 敲 [qiāo] (敲代码 [qiāo dàimǎ], literally 'to tap/type code').
Often used with (3)
写代码 xiě dàimǎ to write code
一段代码 yī duàn dàimǎ a piece of code
源代码 yuándàimǎ source code

Practice it

✏️ Fill the gapWhich word fills the gap?

他每天都在电脑上写____。

He writes code on the computer every day.

🎙 Panda Mic Tap the mic and say the line

代码

code

🎙 Panda Mic Tap the mic and say the line

这段代码里有一个错误。

There is an error in this piece of code.

Learn Mandarin Chinese with Wang Wei and Li Na

Every word here is part of an ongoing story with games, audio, and hosts you'll get to know.

A complete course · Beginner to fluent (A1–C2)

Start the free course →