Python TQC考題502 乘積,def by 儲蓄保險王 · 2022-04-29 #Python TQC考題502 乘積 def compute(x,y): return x*y x=eval(input()) y=eval(input()) ans=compute(x,y) print(ans) 相關文章Python 如何做excel的樞紐分析? pandas.DataFrame.groupby() ; .agg( {column name: function name} ) ; 如何讀取多層index的xlsx檔案? df = pandas.read_excel (fpath, index_col =[0,1]) ; 如何顯示所有欄? pd.set_option ( "display.max_columns", None)Word表格設計,TQC考題210:套房出租,版面配置>內容>文繞圖>位置 Python hashlib 快速入門:為資料建立唯一指紋import hashlib; data = "文字".encode('utf-8'); hash_obj = hashlib.sha256(data); result = hash_obj.hexdigest() #digest:「取得雜湊摘要」或「取得摘要值」Python逐位元運算(bitwise operation),或or | , 且and & , 互斥或xor ^ , 反向~ ;位元左移 x << y => 效果同x*(2**y) ; 位元右移 x>>1 => 效果同x//2;x>>16效果同 x//(2**16)Python TQC考題902 資料加總, data=file.read().split()Python 現代化開發:告別 os.makedirs,擁抱 pathlib 的優雅; Path("你的/路徑").mkdir(parents=True, exist_ok=True)Word:圖文編輯Python機器學習: train_test_split() 切割資料為訓練資料跟測試資料; 二元分類 ; 邏輯迴歸 (Logistic Regression); from sklearn.model_selection import train_test_split ; lmLogR= linear_model.LogisticRegression(solver=”sag”, max_iter=10000)Python 具有強制特性的函式庫規格化; from multipledispatch import dispatch
近期留言