Demo4 陣列應用

2021-08-22 02:43:43 字數 744 閱讀 8298

package test01;

//進製轉換

/*public static void main(string args)

;string str = tostring(arr);

system.err.println(str);

//需求1:定義功能將陣列中的元素轉成字串「」

// 明確1 :結果 字串

//明確2 :引數 陣列

// 思路:簡單的方式就是利用了字串和任意資料相加都是相連線

}public static string tostring(int arr);

// 0 1 2 3 4 5 6 7

return weeks[num];//陣列都是從0開始的

}*///封裝 用函式tohex函式

/*public static void main(string args)

public static void tohex(int num)

}*///去除0,順序轉換

//解決:每運算一位,用容器儲存

//順序轉換

/*public static void main(string args)*/

/*public static string tohex(int num)

//遍歷輸出陣列

// for(int x=0;x

python實現 檔案Demo4

coding utf 8 created on sun feb 4 00 14 09 2018 author administrator 替換掉檔案中的字元 file name input 請輸入要開啟的檔名 try f r open file name,r content f r.read old...

LR回購demo 4 各個評價指標

rmse一般大於mae的原因是個別資料差異較大導致。from sklearn.model selection import train test split 將資料分為測試集和訓練集 import linearregression1 boston datasets.load boston print...

裝飾器應用demo

log 為乙個方法新增 log 函式,檢查輸入的引數 class math function log target,name,descriptor with args return oldvalue.this args return descriptor const math newmath cal...