發表文章

目前顯示的是 2019的文章

Python基本觀念與變數

圖片
本章參考: 王者歸來 做的筆記 一、Python認識  1.Python是一種Interpreted language、Object Oriented Language的程式語言,並擁有完整的函數庫。 2.Python算是一種動態高階語言,具有Garbage collection機制。 3.Python是一個Open Source,並且本身有許多package或module。 二、靜態語言與動態語言 1.variable是一個語言核心,由變數的設定可以知道這個程式所要完成的工作;variable分成static language與dynamic language 2.有些程式語言的variable在使用前需要宣告他的資料型態,這樣compile可在記憶體內預留空間給variable。同時,這個變數的資料型態經過宣告後,未來無法再改變他的資料型態,這類的程式語言稱static language 3.variable在使用前不必宣告他的資料型態,其特色不用經過compile過程,而是使用interpreter直接interpret與execute,這類的程式語言稱dynamic language(scripting language、glue code) 4.實際案例,利用Python列出變數的位址,相同的內容的變數會有相同的位址。 5.刪除變數,雖然python變數宣告很方便,但有時候宣告過多,執行起來會有點小卡,因此可以刪除變數                                                      del 變數名稱

Australia Uses New Technology to Catch Drivers on Phones

Australia Uses New Technology to Catch Drivers on Phones An Australian state is trying to stop people from using their phones while driving by putting new Mobile Phone Detection Cameras on its roads. Road safety experts are concerned about the growing number of accidents involving drivers using phones on New South Wales roads. New South Wales Roads Minister Andrew Constance believes using a phone while driving is as dangerous as driving drunk. The government of New South Wales plans to have 45 Mobile Phone Detection Cameras across the state by December 2019. Each device has two cameras, one which looks into the car and can see what drivers are doing with their hands, and one that can see cars' registration plates. Officials say the new cameras could prevent 100 fatal and serious injuries over five years. A six-month test using just two of the devices this year checked 8.5 million vehicles and found more than 100,000 drivers with their hands on the phones. One driver was cau

US Actress Gets 14 Days for College Scam

US Actress Gets 14 Days for College Scam On September 13, Desperate Housewives star Felicity Huffman was given 14 days in prison for paying $15,000 to raise the score on her daughter's college entrance exam. "I was frightened, I was stupid, and I was so wrong," Huffman, 56, said as she became the first parent to get prison time in a college admissions scandal that has involved many rich parents. A total of 51 people have been charged in the scam. Prosecutors said parents paid to change test scores or paid coaches to get their children into top schools by having them recruited as athletes for sports they didn't even play. At the center of the scam is William "Rick" Singer, who paid a test proctor to correct the answers on Huffman's daughter's exam. Some parents are accused of paying up to $500,000 for Singer's help. Authorities said Huffman's daughter Sophia got an exam result that was 400 points higher than her score on a practice exam.