###### tags: `學期一` # 學期一作業 A7: 經典猜數字:熱身題 修正公告 outline 讓學生知道 A7 會有哪些更動 + 為什麼會更動 加一個 quiz ----- 在觀察同學們在學期一作業 [A7: 經典猜數字:熱身題](https://lighthouse.alphacamp.co/courses/39/assignments/919) 的作答狀況以及從助教收集而來資訊,我們察覺到許多同學在寫這份作業時,普遍容易有以下的狀況發生: - 不是非常清楚「變數宣告」與「變數賦值」的差別 - 沒有非常理解 while 迴圈的運作原理:不確定 while 迴圈條件該如何設定、以及不清楚 break 的作用 不知道你當初在寫這份作業時,是不是也有遇到類似的狀況呢? #### 觀念釐清小測驗 為了幫大家釐清觀念,以下我們準備了一題 quiz: Q:關於下圖這段程式碼的描述,哪些是正確的?(複選) <div style="width:100%; text-align: center"> <a href="https://assets-lighthouse.alphacamp.co/uploads/image/file/15652/A7_revise.png" target="_blank"> <img style="max-width:800px; width:100%;" src="https://assets-lighthouse.alphacamp.co/uploads/image/file/15652/A7_revise.png"> <small>點擊圖片看大圖</small></a> </div> 選項: 1. 第 3 行是宣告變數 guess 2. 第 12 行再次宣告了變數 guess 3. 第 12 行是給變數 guess 重新賦值 4. 只要第 10 行 while 後面 ( ) 裡定義的執行條件成立,後面 { } 中的程式碼就會被重覆執行 <a class="btn btn-secondary" role="button" data-toggle="collapse" href="#WF-S6L1U3-CN-1" aria-expanded="false" aria-controls="WF-S6L1U3-CN-1">想好你的答案了嗎?想好再點我看正確答案喔!</a> <div class="collapse" id="WF-S6L1U3-CN-1"> <div style="padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px;"> 答案是 1、2、4。 如果答錯的話,建議你複習「<a href="https://lighthouse.alphacamp.co/courses/39/units/5489" target="_blank">變數</a>」以及「<a href="https://lighthouse.alphacamp.co/courses/39/units/5498" target="_blank">重覆執行程式碼:迴圈</a>」這兩個單元,也可以回去檢查看看你的作業 <a href="https://lighthouse.alphacamp.co/courses/39/assignments/919" target="_blank">A7: 經典猜數字:熱身題</a>是不是有犯下類似的錯誤喔! </div> </div> 此題 quiz 也將於近日同步更新於作業 [A7: 經典猜數字:熱身題](https://lighthouse.alphacamp.co/courses/39/assignments/919) 當中,你可以隨時回去複習 無論你現在在哪個階段學習,都鼓勵你檢驗自己關於變數、迴圈的基本觀念。基礎越紮實、未來的學習腳步才能越走越穩喔!💪 💪 💪 <div style="width:100%"><img style="max-width:1000px; width:100%;" src="https://assets-lighthouse.s3.amazonaws.com/uploads/image/file/4416/banner_2.001.jpeg"></div>
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up