Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self-learning by Luyeom-week3_hw6 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions homeworks/week3/hw6.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## hw1:好多星星

一開始興高采烈地把筆記上的code寫上去,卻一直失敗,才發現要把上面那一段code也加進去,沒有仔細看題目真是壞習慣。
## hw2:水仙花數

身為數學成績爛到有剩的人,當然是題目有看沒有懂,查了很多範例,還是想不出要怎麼解,所以只好先看解說影片來解題,然後又是一連串的錯誤訊息。關於外包函式的做法,現在還是搞不太懂要先跑哪個函式,得多練習一些題目來建立邏輯。
## hw3:判斷質數

原本我把return false的條件寫在一起: if(n===1 && n%i ===0),結果一直跑不出AC,把兩個條件分開寫就成功了,不知道是為什麼呢?
## hw4:判斷迴文

要倒轉函式,就要將疊加的迴圈改為遞減,再一個一個比對是否跟原字串相同。
## hw5:聯誼順序比大小
這個題目除了要比數字大小,還要注意數字的長度,就像用電腦排序時,如果個位數的數字前方沒有加上0,排序就會亂掉一樣。