發表文章

洪宸威excel公式formulas

檔案 常用 插入 版面配置 公式 資料 校閱 檢視 說明 File Home Insert Page Layout Formula s Data Review View Help 插入函數 自動加總 最近用過的函數 財務 邏輯 文字 日期和時間 查閱與參照 數學與三角函數 其他函數 Insert Function AutoSum Recently Used Financial Logical Text Date & Time Lookup & Reference Math & Trinomial More Functions TR=TABLE ROW

洪宸威HTML.CSS.Javascript.Python

<H1>HTML超文件標示語言 H yper T ext M arkup L anguage</H1> <IFRAME> SRC="https://zh.wikipedia.org/zh-tw/html="100%WIDTH FRAME相框、窗框,SRC=SOURCE來源 <H1>CSS階層式樣式表Cascading Styie Sheets<H1> <IFRAME SRC="https://zh.wikipedia.org/zh-tw/CSS"  <H1>CSS階層式樣式表Cascading S

洪宸威python字串方法in找到特定「題號」和題目

file = open('金融常識.txt','r',encoding='utf-8') lines = file.readlines() file.seek(0) #讀完readlines()記憶體指標回到檔案開頭 reading = file.read() #上個星期read()是讀取所有字元 file.close() total=len(lines) print(total, len(reading)) x = input('洪宸威輸入搜尋關鍵詞,列出所有題目: ') n = 0 for i in range(total): #迴圈使用數字0到503 if x in lines[i]: # if line.find(x) != -1: 使用python更強的功能in n += 1 # 被更常使用 print(n, '題號',i+1,lines[i],end="")#預設結束換列 print(f'\n總共{n}題目')

洪宸威python,方法read(),seek(0),readlines(),input,in

file = open('金融常識.txt','r',encoding='utf-8') lines = file.readlines() file.seek(0) #讀完readlines()記憶體指標回到檔案開頭 reading = file.read() #上個星期read()是讀取所有字元 file.close() print(len(lines), len(reading)) x = input('金一乙天大王輸入搜尋關鍵詞,列出所有題目: ') n = 0 for line in lines: if x in line: # if line.find(x) != -1: 使用python更強的功能in n += 1 # 被更常使用 print(n, ' ',line,end="")#預設結束換列 print(f'\n總共{n}題目')