原创 在python.org的初次接觸與目標

python的主頁就好像一片等待探索的大草原,在較爲細緻的瀏覽過後, 我瞭解到了python這個語言的幾個特點,對它有了更深入的認識。 python有強大的庫: 從python主頁上,我瞭解到python有很多方面的應用,其列出

原创 python第20次作業(15周)-sklearn

題目: 該題目需要生成一個數據集,用三種不同的機器學習算法進行訓練,由此來評估這三種算法的性能(根據給出的標準)。根據提示的步驟來一步步實現。 1.人工生成數據集 根據給出的參數提示,生成數據集。 參考: http://sci

原创 python第19次作業(14周)-Anscombe's quartet

提要:配置jupyter notebook可以參考 https://blog.csdn.net/red_stone1/article/details/72858962 下載的csv文件如果出現問題,可以參考: https://jin

原创 文章查看說明

高級編程課作業 在個人分類->python作業下即可查看全部作業

原创 Exercise10-Scipy

Exercise10.1 Least squares 分析: 使用numpy.linalg.lstsq來計算。 相關說明: numpy.random.randint low、high、size三個參數。默認high是None,如果

原创 LeetCode-array2

Title: Two Sum II - Input array is sorted Related Topics: Array , Binary Search, Two Pointers Describe: Given an array

原创 Exercise9-Numpy

Premise: 分析: 要生成兩個矩陣,A爲高斯(正態分佈)矩陣,可以numpy.random.normal獲得;B爲Toeplitz矩陣,可用scipy.linalg 中的toeplitz獲得。 內置函數等介紹: numpy.ra

原创 LeetCode-LinkedList1

Title: T83.Remove Duplicates from Sorted List Related Topics: LinkedList Describe: Given a sorted linked list, delete a

原创 python第五次練習

例題6-5   描述:創建字典,存儲三條大河流及其流經國家。              打印指定消息,分別打印全部河流和國家。   代碼: river_country = { 'yellow river': 'china',

原创 LeetCode-string1

Title: T58. Length of Last Word Related Topics: string Describe: Given a string s consists of upper/lower-case alphabet

原创 Exercise11-Matplotlib

Exercise 11.1: Plotting a function 分析: 要繪製這樣的函數圖像,用點來描繪,選擇給定區間較密集的點(用numpy.arange實現其x座標在該區域的等距選取),y用給定的表達式給出,使用plot繪製即

原创 LeetCode-array1

Related Topics: Array , Binary Search Describe: Given a sorted array and a target value, return the index if the target

原创 python第四次練習

例題5-6 人生的不同階段   描述:設置變量age 的值,再編寫一個if-elif-else 結構,              根據age 的值判斷處於人生的哪個階段。   代碼: age = 19 if age < 2:

原创 python第十次練習(第十一章)

例題11-1 城市和國家& 11-2 人口數量 描述:    編寫一個函數,它接受兩個形參:一個城市名和一個國家名。這個函數返回一個格式爲City, Country 的字符串,如Santiago, Chile 。將這個函數存儲在一個名爲

原创 python第八次練習

例題9-1 餐館    描述:創建Restaurant 類,               init() 設置兩個屬性:restaurant_name 和cuisine_type 。               創建一個名爲descri