Function Description
=AND Returns TRUE or FALSE based on two or more conditions
=AVERAGE Calculates the average (arithmetic mean)
=AVERAGEIF Calculates the average of a range based on a TRUE or FALSE condition
=AVERAGEIFS Calculates the average of a range based on one or more TRUE/FALSE conditions
=CONCAT Links together the content of multiple cells
=COUNT Counts cells with numbers in a range
=COUNTA Counts all cells in a range that has values, both numbers and letters
=COUNTBLANK Counts blank cells in a range
=COUNTIF Counts cells as specified
=COUNTIFS Counts cells in a range based on one or more TRUE or FALSE condition
=IF Returns values based on a TRUE or FALSE condition
=IFS Returns values based on one or more TRUE or FALSE conditions
=LEFT Returns values from the left side of a cell
=LOWER Reformats content to lowercase
=MAX Returns the highest value in a range
=MEDIAN Returns the middle value in the data
=MIN Returns the lowest value in a range
=MODE Finds the number seen most times. The function always returns a single number
=NPV The NPV function is used to calculate the Net Present Value (NPV)
=OR Returns TRUE or FALSE based on two or more conditions
=RAND Generates a random number
=RIGHT Returns values from the right side of a cell
=STDEV.P Calculates the Standard Deviation (Std) for the entire population
=STDEV.S Calculates the Standard Deviation (Std) for a sample
=SUM Adds together numbers in a range
=SUMIF Calculates the sum of values in a range based on a TRUE or FALSE condition
=SUMIFS Calculates the sum of a range based on one or more TRUE or FALSE condition
=TRIM Removes irregular spacing, leaving one space between each value
=VLOOKUP Allows vertical searches for values in a table
=XOR Returns TRUE or FALSE based on two or more conditions
file = open('金融常識.txt','r',encoding='utf-8') lines = file.readlines() file.seek(0) #讀完readlines()記憶體 reading = file.read() #上個星期read()是讀取所有字元 file.close() 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}題目')
留言
張貼留言