Python TQC考題304 迴圈倍數總和,==是邏輯判斷式 by 儲蓄保險王 · 2022-04-28 #Python TQC考題304 迴圈倍數總和 a=eval(input()) sum=0 for i in range(1,a+1): if i%5 == 0:sum+=i print(sum) 特價 擦出凝膠感!持續發亮組 特價 時尚高機能風雨衣2.0版 (SGS檢驗合格!) 特價 鮮採冷凍泰國金枕頭榴槤 特價 【吸盤系列】太空鋁折疊毛巾架 特價 時尚高機能風雨衣2.0版 (SGS檢驗合格!) 箱裝組任選【第2箱5折】 相關文章Python: list.index() 只能找到第一個元素的index,若元素有重複,如何找出所有index? indexes = [index for index, value in enumerate(my_list) if value == target]Python GUI: 如何使用tkinter建立垃圾桶icon (Unicode: "\U0001F5D1")的Button?一按就刪除掉Label + Entry + Button ; trash_icon = tk.PhotoImage( file = trash_icon_path)Python: 前綴f string 格式化字串 hex_string = f'0x{value :02x}' #:02x or :08b是格式化說明符(format specifier) ; hex() or bin() #轉為16 or 2進位數字,會省略前導0Python: 如何計算全文件詞頻(term frequency,簡稱TF)?如何使用jieba做中文斷詞? lis_jieba = jieba.lcut(strr)Python: ModuleNotFoundError: No module named 'pip' ; 如何安裝pip套件?下載並執行get-pip.py; where python #查看python安裝路徑; python -V #查看python版本; 如何查看指定路徑python的版本?Python:如何建立新資料夾?os.mkdir() ; os.makedirs() ; 有何差別?Python pandas: 高效數據重構(樞紐分析) — 使用 groupby("Name").cumcount, set_index 與 unstack 將長格式轉為寬格式Python 正則表示法 regular expression: re.match() ; re.search() ; re.findall() ; re.fullmatch() 有何差別?Python爬蟲:BeautifulSoup的.find_all() 與select() ; from bs4 import BeautifulSoup ; .string .text .get_text() 獲取文字內容
0 Python IDE(Integrated Development Environment 整合開發環境) colab如何掛載雲端硬碟?from google.colab import drive; drive.mount( ‘/content/drive’ ) ; 檔案複製shutil.copy() #shell utility; 檔案移動shutil.move( source_file, destination_path); 刪除整個資料夾shutil.rmtree( folder_to_delete ); 刪除某一個檔案os.remove() #shutil.remove()會觸發AttributeError; 如何將檔案路徑拆分為父資料夾與檔案名稱(含副檔名)? os.path.dirname( file_path) ; os.path.basename( file_path) 如何將檔案名稱拆分為主檔名與副檔名? os.path.splitext( file_name) #split(分裂) ext的意思 2023-07-16
0 Python 機器學習:手把手教你用 sklearn.preprocessing .StandardScaler 做數據標準化(Standardization); from sklearn.preprocessing import StandardScaler ; 儲存/載入 scaler or model: joblib.dump() / joblib.load() 2025-05-08
近期留言