{"id":9234,"date":"2016-05-29T12:26:13","date_gmt":"2016-05-29T16:26:13","guid":{"rendered":"http:\/\/cscircles.cemc.uwaterloo.ca\/?page_id=9234"},"modified":"2017-06-29T10:54:49","modified_gmt":"2017-06-29T14:54:49","slug":"zh-7","status":"publish","type":"page","link":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/zh-7\/","title":{"rendered":"7: \u4e30\u5bcc\u7684\u7f16\u8f91"},"content":{"rendered":"<!-- Please retain this notice and add more notes if you create a new version.<br \/>\nOriginal lesson author: David Pritchard, daveagp@gmail.com, http:\/\/cscircles.ca<br \/>\nLicense: http:\/\/creativecommons.org\/licenses\/by-nc-sa\/3.0\/-->\n<p>\u5269\u4e0b\u7684\u8bfe\u7a0b\u4f1a\u6559\u4f60\u5982\u4f55\u4f7f\u7f16\u8f91\u62e5\u6709\u201c\u4e30\u5bcc\u7684\u7279\u70b9\u201d\u3002The remainder of the lessons allow you to use an editor with \"rich features.\" \u8bf7\u770b\u4e0b\u9762\u7684\u7a0b\u5e8f\u3002<form class=\"pbform\" action=\"#\" id=\"pbform0\" method=\"POST\">\n<div class='pybox modeNeutral  facultative' id='pybox0'>\n<div class=\"heading\"><span class='type'>Example: <\/span><span class='title'>\u4e30\u5bcc\u7684\u7f16\u8f91\u6f14\u793a<\/span><\/div>\u5c1d\u8bd5\u4e30\u5bcc\u7684\u7f16\u8f91\u3002<div class='pyboxTextwrap pyboxCodewrap RW resizy'  style='height: 526px;'><textarea wrap='off' name='usercode0' id='usercode0'  cols=10 rows=20   class='pyboxCode RW'>\ninfo = \"The rich editor does syntax highlighting\"\n# \u81ea\u52a8\u8c03\u6574\u5927\u5c0f\u3002\u624b\u52a8\u8c03\u6574\u62d6\u52a8\u5e95\u90e8\u8fb9\u6846\u3002\ncool = True\nfor i in range(0, max(3, 1+2*3-4)):\n   print('It also colours matching parentheses as you type')\n<\/textarea><\/div>\n<div id='pbhistory0' class='flexcontain' style='display:none;'><\/div>\n<input type='hidden' id='defaultCode0' value='info = \\\"The rich editor does syntax highlighting\\\"\\n# \\u81ea\\u52a8\\u8c03\\u6574\\u5927\\u5c0f\\u3002\\u624b\\u52a8\\u8c03\\u6574\\u62d6\\u52a8\\u5e95\\u90e8\\u8fb9\\u6846\\u3002\\ncool = True\\nfor i in range(0, max(3, 1+2*3-4)):\\n   print(\\u0027It also colours matching parentheses as you type\\u0027)\\n'><\/input>\n<div class='pyboxbuttons'><table><tr>\n<td><input type='submit' name='submit' id='submit0' value=' '\/><\/td>\n<td><input type='button' name='consolecopy' value=\"Open in console\" onclick=\"pbConsoleCopy(0)\" ><\/td>\n<td><input type='button' name='visualize' value=\"Visualize\" onclick=\"pbVisualize(0,'N')\" ><\/td>\n<td><input type='button' name='history' value=\"History\" onclick=\"historyClick(0,'7.sample')\" ><\/td>\n<\/tr><\/table><select id='pbSelect0' class='selectmore'><option name='more'>More actions...<\/option>\n<option name='default' data-pbonclick=\"pbSetText(0,descape($('#defaultCode0').val()))\" >Reset code to default<\/option>\n<\/select><\/div>\n<input type=\"hidden\" name=\"lang\" value=\"\"\/><input type=\"hidden\" id=\"inputInUse0\" name=\"inputInUse\" value=\"Y\"\/>\n<input type=\"hidden\" name=\"pyId\" value=\"0\"\/>\n<input type=\"hidden\" name=\"hash\" value=\"7d72acbe9c1253202b6e0385f71e9760\"\/>\n<div id='pbresults0' class='pbresults avoidline'><\/div>\n<\/div>\n<\/form>\n<script type='text\/javascript'>jQuery(function(){pbToggleCodeMirror(0);});document.getElementById(\"submit0\").value = \"Run program\";document.getElementById(\"inputInUse0\").value = \"N\";<\/script>\n\u4f60\u53ef\u4ee5\u63d0\u4ea4\uff0c\u4fdd\u5b58\u548c\u52a0\u8f7d\u7f16\u8f91\u3002<table class='pywarn'><tr><td class='pywarnleft'><img src='https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-content\/plugins\/pybox\/files\/warning.png'\/><\/td><td class='pywarnright'><span> \u4e30\u5bcc\u7684\u7f16\u8f91\u4f1a\u5728\u4ee5\u540e\u7684\u8bfe\u7a0b\u51fa\u73b0\u3002 <\/span><\/td><\/table> \u8fd9\u8282\u8bfe<em>\u975e\u5e38<\/em>\u4e30\u5bcc\uff0c\u6709\u4e09\u8282\u8bfe\uff0c\u53ef\u4ee5\u4e0d\u5206\u987a\u5e8f\u5b8c\u6210\u3002\u9009\u62e9\u4e00\u8bfe\u7ee7\u7eed\uff1a<\/p>\n<ol style=\"list-style-type: upper-alpha;\">\n<li><a class=\"open-same-window\" href=\"..\/zh-7a\/\">\u5b57\u7b26\u4e32\uff08\u5927\u5757\u6587\u672c\uff09\u548c\u5b57\u7b26\uff08\u5b57\u6bcd\u548c\u6570\u5b57\uff09\u3002<\/a><\/li>\n<li><a class=\"open-same-window\" href=\"..\/zh-7b\/\">\u6570\u5b66\u8fd0\u7b97\uff08*, +, -, \/\uff09\uff0c\u62ec\u53f7\u4ee5\u53ca\u5bfc\u5165<code>\u6570\u5b66<\/code>\u6a21\u5757\u3002<\/a><\/li>\n<li><a class=\"open-same-window\" href=\"..\/zh-7c\/\">\u521b\u5efa<code>while<\/code>\u548c<code>for<\/code>\u5faa\u73af\uff0c\u901a\u8fc7<code>break<\/code>\u548c<code>continue<\/code>\u638c\u63a7\u7a0b\u5e8f\u3002<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u5269\u4e0b\u7684\u8bfe\u7a0b\u4f1a\u6559\u4f60\u5982\u4f55\u4f7f\u7f16\u8f91\u62e5\u6709\u201c\u4e30\u5bcc\u7684\u7279\u70b9\u201d\u3002The remainder of the lessons allow you to use an editor with \"rich features.\" \u8bf7\u770b\u4e0b\u9762\u7684\u7a0b\u5e8f\u3002 Example: \u4e30\u5bcc\u7684\u7f16\u8f91\u6f14\u793a\u5c1d\u8bd5\u4e30\u5bcc\u7684\u7f16\u8f91\u3002 info = \"The rich editor does syntax highlighting\" # \u81ea\u52a8\u8c03\u6574\u5927\u5c0f\u3002\u624b\u52a8\u8c03\u6574\u62d6\u52a8\u5e95\u90e8\u8fb9\u6846\u3002 cool = True for i in range(0, max(3, 1+2*3-4)): print('It also colours matching &hellip; <a href=\"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/zh-7\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-9234","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/pages\/9234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/comments?post=9234"}],"version-history":[{"count":8,"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/pages\/9234\/revisions"}],"predecessor-version":[{"id":10244,"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/pages\/9234\/revisions\/10244"}],"wp:attachment":[{"href":"https:\/\/cscircles.cemc.uwaterloo.ca\/dev\/wp-json\/wp\/v2\/media?parent=9234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}