forked from program-in-chinese/C8
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,35 @@ | ||
''' | ||
jsq=解释器=interpreter | ||
https://docs.python.org/3/tutorial/interpreter.html | ||
说明:if这种简单的词就不翻了 | ||
''' | ||
# 代码片段1 | ||
""" | ||
>>> the_world_is_flat = True | ||
>>> if the_world_is_flat: | ||
... print("Be careful not to fall off!") | ||
... | ||
Be careful not to fall off! | ||
""" | ||
|
||
# 片段一/汉化 | ||
原文='Be careful not to fall off!' | ||
翻译='小心别掉下来。' # https://fanyi.baidu.com/#en/zh/Be%20careful%20not%20to%20fall%20off | ||
|
||
语句=翻译; 输出=print | ||
真的,假的 =True,False | ||
|
||
世界是平的? = 真的 | ||
|
||
世界是平的 = 真的 if 世界是平的? else 假的 | ||
|
||
if 世界是平的: 输出(语句) | ||
|
||
# -*- coding: encoding -*- | ||
|
||
""" | ||
For example, to declare that Windows-1252 encoding is to be used, the first line of your source code file should be: | ||
# -*- coding: cp1252 -*- | ||
""" |