# 程式語言 {%hackmd @themes/orangeheart %} <style> .likecoin-button { position: relative; width: 100%; max-width: 485px; max-height: 240px; margin: 0 auto; } .likecoin-button > div { padding-top: 49.48454%; } .likecoin-button > iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .markdown-body{ word-wrap:break-word; color:#000; font-family:Optima-Regular,Optima,PingFangSC-light,PingFangTC-light,PingFang SC,Cambria,Cochin,Georgia,Times,Times New Roman,serif; font-size:16px; letter-spacing:0; line-height:1.6;max-width:860px; padding:5px 20px; text-align:left; word-break:break-word; word-spacing:0}.markdown-body p{ color:#000; font-size:16px; line-height:26px; margin:0; padding-bottom:8px; padding-top:8px } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6{ color:#000; font-weight:700; margin-bottom:15px; margin-top:30px; padding:0 } .markdown-body h1{ font-size:2.5rem } .markdown-body h2{ border-bottom:2px solid #61679e; font-size:2.1rem } .markdown-body h2 span{ background:#61679e; border-top-left-radius:5px; border-top-right-radius:5px; color:#fff; display:inline-block; font-weight:700; margin-right:0; padding:5px 10px 1px } .markdown-body h3{ font-size:1.8rem } .markdown-body h4{ font-size:1.65rem } .markdown-body h5, .markdown-body h6{ font-size:1.5rem } .markdown-body ol, .markdown-body ul{ color:#000; margin-bottom:8px; margin-top:8px; padding-left:25px } .markdown-body ul{ list-style-type:disc } .markdown-body ul ul{ list-style-type:square } .markdown-body ol{ list-style-type:decimal } .markdown-body li section{ color:#010101;font-weight:500; line-height:26px; margin-bottom:5px; margin-top:5px; text-align:left } .markdown-body blockquote{ overflow-scrolling:touch; background:#eff0f5; border-left:3px solid #61679e !important; color:#6a737d; display:block; font-size:.9em; margin-bottom:10px; margin-top:10px; overflow:auto; padding:5px 10px 5px 20px } .markdown-body blockquote p{ color:#000; line-height:26px;margin:0 } .markdown-body a{ word-wrap:break-word; border-bottom:0 solid #61679e; color:#61679e; font-weight:700; text-decoration:none } .markdown-body li code, .markdown-body p code{ word-wrap:break-word; background-color:rgba(27,31,35,.05); border-radius:4px; color:#61679e; ont-family:Operator Mono,Consolas,Monaco,Menlo,monospace; font-size:14px; margin:0 2px; padding:2px 4px; word-break:break-all } .markdown-body table{ display:table; text-align:left } .markdown-body tbody{ border:0 } .markdown-body table tr{ background-color:#fff; border:0; border-top:1px solid #ccc } .markdown-body table tr:nth-child(2n){ background-color:#f8f8f8 } .markdown-body table tr td, .markdown-body table tr th{ border:1px solid #ccc; font-size:16px; padding:5px 10px; text-align:left } .markdown-body table tr th{ background-color:#f0f0f0; font-weight:700 } .markdown-body li code, .markdown-body span code{ color:#61679e } .markdown-body mark{ background-color:#61679e; border-radius:2px; border-radius:4px; color:#fff; font-weight:500; margin:0 2px; padding:2px 4px } .markdown-body .anchor{ margin-left:-40px } .octicon-link{ border-radius:3px; color:#fff!important; padding:5px 10px!important } .gallery { display: flex; gap: 16px; justify-content: center; } .gallery-item { width: 300px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background-color: #fff; /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */ display: flex; flex-direction: column; align-items: center; } .gallery-item img { width: 100%; height: 180px; object-fit: cover; } .gallery-content { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; width: 100%; } .gallery-title { font-size: 14px; font-weight: bold; margin-bottom: 8px; text-align: center; } .gallery-description { font-size: 14px; color: #666; margin-bottom: 12px; } .gallery-details { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #888; margin-bottom: 8px; } .gallery-tag { background-color: #eee; border-radius: 4px; padding: 2px 6px; font-size: 12px; color: #666; } .gallery-duration { font-size: 12px; color: #666; } .gallery-date { font-size: 12px; color: #aaa; text-align: right; } </style> ###### tags: `HomePage` ## 培養邏輯思辨與解決問題的能力 相信大家在高中都一定學過級數和的概念,比如說我們想要從 $1$ 加到 $100$,我們可以用下面的方式計算: $$ \sum^{50}_{i=1} x_i $$ 我們會得到 $5050$。其實我們不難想像,上面的計算方式便是將基數從 $1$ 開始計算,加上一個數字之後再將基數加 $1$,這就是迴圈(loop)的概念。 ```python! ## python code i = 1 result = 0 for i in range(1,101): result += i i += 1 print(result) ``` 學習程式語言就像是將我們在現實世界上面臨的問題,透過一步步拆解的方式進行簡化,並透過更加有效率的方式解決我們人類厭於進行的「重複行為」。更進一步地說,我們在進行簡化的過程中,能夠訓練我們的思辨邏輯:如何良好且有效率地運用電腦的記憶體、如何進行程式專案管理等。 <iframe width="700" height="636" src="https://www.youtube.com/embed/iET4D_S_CJE" title="The Most Popular Programming Languages [2004 - 2020] - Newest Ranking - Race Chart" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> ## 筆記傳送門 <h3><a href='https://hackmd.io/@yueswater/latexLearningHomePage' target="_self">LaTeX學習</a></h3> <h3><a href='https://hackmd.io/@yueswater/R_tutorial' target="_self">R 語言不專業教學</a></h3>