App下載

詞條

大約有 2,000 項(xiàng)符合查詢結(jié)果 ,庫內(nèi)數(shù)據(jù)總量為 78,250 項(xiàng)。(搜索耗時(shí):0.0030秒)

591.Python 最大公約數(shù)算法

Python 最大公約數(shù)算法 Python3 實(shí)例 以下代碼用于實(shí)現(xiàn)最大公約數(shù)算法: # Filename : test.py # author by : www.o2fo.com # 定義一個(gè)函數(shù) def hcf(x, y): """該函數(shù)返回兩個(gè)數(shù)的最大公約數(shù)""" # 獲取最小值 if x > y: smaller = y else: smaller = x for i in...

http://www.o2fo.com/python3/python3-hcf.html

592.Python 最小公倍數(shù)算法

Python 最小公倍數(shù)算法 Python3 實(shí)例 以下代碼用于實(shí)現(xiàn)最小公倍數(shù)算法: # Filename : test.py # author by : www.o2fo.com # 定義函數(shù) def lcm(x, y): # 獲取最大的數(shù) if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)):...

http://www.o2fo.com/python3/python3-lcm.html

593.Python 簡(jiǎn)單計(jì)算器實(shí)現(xiàn)

Python 簡(jiǎn)單計(jì)算器實(shí)現(xiàn) Python3 實(shí)例 以下代碼用于實(shí)現(xiàn)簡(jiǎn)單計(jì)算器實(shí)現(xiàn),包括兩個(gè)數(shù)基本的加減乘除運(yùn)輸: # Filename : test.py # author by : www.o2fo.com # 定義函數(shù) def add(x, y): """相加""" return x + y def subtract(x, y): """相減""" return x - y def mul...

http://www.o2fo.com/python3/python3-calculator.html

594.Python 生成日歷

Python 生成日歷 Python3 實(shí)例 以下代碼用于生成指定日期的日歷: # Filename : test.py # author by : www.o2fo.com # 引入日歷模塊 import calendar # 輸入指定年月 yy = int(input("輸入年份: ")) mm = int(input("輸入月份: ")) # 顯示日歷 print(calendar.month(y...

http://www.o2fo.com/python3/python3-calendar.html

595.Python3 time clock()方法

Python3 time clock()方法 描述 Python time clock() 函數(shù)以浮點(diǎn)數(shù)計(jì)算的秒數(shù)返回當(dāng)前的CPU時(shí)間。用來衡量不同程序的耗時(shí),比time.time()更有用。 這個(gè)需要注意,在不同的系統(tǒng)上含義不同。在UNIX系統(tǒng)上,它返回的是"進(jìn)程時(shí)間",它是用秒...

http://www.o2fo.com/python3/python3-att-time-clock.html

596.Python 使用遞歸斐波那契數(shù)列

Python 使用遞歸斐波那契數(shù)列 Python3 實(shí)例 以下代碼使用遞歸的方式來生成斐波那契數(shù)列: # Filename : test.py # author by : www.o2fo.com def recur_fibo(n): """遞歸函數(shù) 輸出斐波那契數(shù)列""" if n <= 1: return n else: return(recur_fibo(n-1) + recur_fibo(n-...

http://www.o2fo.com/python3/python3-fibonacci-recursion.html

597.Python3 time mktime()方法

Python3 time mktime()方法 描述 Python time mktime() 函數(shù)執(zhí)行與gmtime(), localtime()相反的操作,它接收struct_time對(duì)象作為參數(shù),返回用秒數(shù)來表示時(shí)間的浮點(diǎn)數(shù)。 如果輸入的值不是一個(gè)合法的時(shí)間,將觸發(fā) OverflowError 或 ValueError。 語法 mktim...

http://www.o2fo.com/python3/python3-att-time-mktime-html.html

598.CoffeeScript 類似 Python 的 zip 函數(shù)

類似 Python 的 zip 函數(shù) 問題 你想把多個(gè)數(shù)組連在一起,生成一個(gè)數(shù)組的數(shù)組。換句話說,你需要實(shí)現(xiàn)與Python中的zip函數(shù)類似的功能。Python的zip函數(shù)返回的是元組的數(shù)組,其中每個(gè)元組中包含著作為參數(shù)的數(shù)組中的第i個(gè)元素。 解...

http://www.o2fo.com/coffeescript/6o3v1oa8.html

599.python文本 判斷對(duì)象里面是否是類字符串

python文本 判斷對(duì)象里面是否是類字符串場(chǎng)景:判斷對(duì)象里面是否是類字符串一般立刻會(huì)想到使用 type() 來實(shí)現(xiàn) >>> def isExactlyAString(obj): return type(obj) is type('') >>> isExactlyAString(1) False >...

http://www.o2fo.com/python/16ju1tcf.html

600.OrientDB - Python接口

Python的OrientDB驅(qū)動(dòng)程序使用二進(jìn)制協(xié)議。 PyOrient是git中心項(xiàng)目名稱,有助于連接OrientDB和Python。 它與OrientDB版本1.7和更高版本。以下命令用于安裝PyOrient。 pip install pyorient 您可以使用名為demo.py的腳本文件來執(zhí)行以下任務(wù):1、創(chuàng)...

http://www.o2fo.com/orientdb/orientdb_python_interface.html

抱歉,暫時(shí)沒有相關(guān)的微課

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時(shí)沒有相關(guān)的視頻課程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時(shí)沒有相關(guān)的教程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

591.Python 最大公約數(shù)算法

Python 最大公約數(shù)算法 Python3 實(shí)例 以下代碼用于實(shí)現(xiàn)最大公約數(shù)算法: # Filename : test.py # author by : www.o2fo.com # 定義一個(gè)函數(shù) def hcf(x, y): """該函數(shù)返回兩個(gè)數(shù)的最大公約數(shù)""" # 獲取最小值 if x > y: smaller = y else: smaller = x for i in...

http://www.o2fo.com/python3/python3-hcf.html

592.Python 最小公倍數(shù)算法

Python 最小公倍數(shù)算法 Python3 實(shí)例 以下代碼用于實(shí)現(xiàn)最小公倍數(shù)算法: # Filename : test.py # author by : www.o2fo.com # 定義函數(shù) def lcm(x, y): # 獲取最大的數(shù) if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)):...

http://www.o2fo.com/python3/python3-lcm.html

593.Python 簡(jiǎn)單計(jì)算器實(shí)現(xiàn)

Python 簡(jiǎn)單計(jì)算器實(shí)現(xiàn) Python3 實(shí)例 以下代碼用于實(shí)現(xiàn)簡(jiǎn)單計(jì)算器實(shí)現(xiàn),包括兩個(gè)數(shù)基本的加減乘除運(yùn)輸: # Filename : test.py # author by : www.o2fo.com # 定義函數(shù) def add(x, y): """相加""" return x + y def subtract(x, y): """相減""" return x - y def mul...

http://www.o2fo.com/python3/python3-calculator.html

594.Python 生成日歷

Python 生成日歷 Python3 實(shí)例 以下代碼用于生成指定日期的日歷: # Filename : test.py # author by : www.o2fo.com # 引入日歷模塊 import calendar # 輸入指定年月 yy = int(input("輸入年份: ")) mm = int(input("輸入月份: ")) # 顯示日歷 print(calendar.month(y...

http://www.o2fo.com/python3/python3-calendar.html

595.Python3 time clock()方法

Python3 time clock()方法 描述 Python time clock() 函數(shù)以浮點(diǎn)數(shù)計(jì)算的秒數(shù)返回當(dāng)前的CPU時(shí)間。用來衡量不同程序的耗時(shí),比time.time()更有用。 這個(gè)需要注意,在不同的系統(tǒng)上含義不同。在UNIX系統(tǒng)上,它返回的是"進(jìn)程時(shí)間",它是用秒...

http://www.o2fo.com/python3/python3-att-time-clock.html

596.Python 使用遞歸斐波那契數(shù)列

Python 使用遞歸斐波那契數(shù)列 Python3 實(shí)例 以下代碼使用遞歸的方式來生成斐波那契數(shù)列: # Filename : test.py # author by : www.o2fo.com def recur_fibo(n): """遞歸函數(shù) 輸出斐波那契數(shù)列""" if n <= 1: return n else: return(recur_fibo(n-1) + recur_fibo(n-...

http://www.o2fo.com/python3/python3-fibonacci-recursion.html

597.Python3 time mktime()方法

Python3 time mktime()方法 描述 Python time mktime() 函數(shù)執(zhí)行與gmtime(), localtime()相反的操作,它接收struct_time對(duì)象作為參數(shù),返回用秒數(shù)來表示時(shí)間的浮點(diǎn)數(shù)。 如果輸入的值不是一個(gè)合法的時(shí)間,將觸發(fā) OverflowError 或 ValueError。 語法 mktim...

http://www.o2fo.com/python3/python3-att-time-mktime-html.html

598.CoffeeScript 類似 Python 的 zip 函數(shù)

類似 Python 的 zip 函數(shù) 問題 你想把多個(gè)數(shù)組連在一起,生成一個(gè)數(shù)組的數(shù)組。換句話說,你需要實(shí)現(xiàn)與Python中的zip函數(shù)類似的功能。Python的zip函數(shù)返回的是元組的數(shù)組,其中每個(gè)元組中包含著作為參數(shù)的數(shù)組中的第i個(gè)元素。 解...

http://www.o2fo.com/coffeescript/6o3v1oa8.html

599.python文本 判斷對(duì)象里面是否是類字符串

python文本 判斷對(duì)象里面是否是類字符串場(chǎng)景:判斷對(duì)象里面是否是類字符串一般立刻會(huì)想到使用 type() 來實(shí)現(xiàn) >>> def isExactlyAString(obj): return type(obj) is type('') >>> isExactlyAString(1) False >...

http://www.o2fo.com/python/16ju1tcf.html

600.OrientDB - Python接口

Python的OrientDB驅(qū)動(dòng)程序使用二進(jìn)制協(xié)議。 PyOrient是git中心項(xiàng)目名稱,有助于連接OrientDB和Python。 它與OrientDB版本1.7和更高版本。以下命令用于安裝PyOrient。 pip install pyorient 您可以使用名為demo.py的腳本文件來執(zhí)行以下任務(wù):1、創(chuàng)...

http://www.o2fo.com/orientdb/orientdb_python_interface.html

抱歉,暫時(shí)沒有相關(guān)的文章

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

熱門課程