App下載

詞條

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

581.Python3 列表 extend()方法

Python3 列表 描述 extend() 函數(shù)用于在列表末尾一次性追加另一個(gè)序列中的多個(gè)值(用新序列擴(kuò)展原來(lái)的列表)。 不是所有的序列都可以用來(lái)追加的,只能使用與列表結(jié)構(gòu)相近的序列,比如字符串,列表,元組,集合。 語(yǔ)法 extend(...

http://www.o2fo.com/python3/python3-att-list-extend.html

582.Python 攝氏溫度轉(zhuǎn)華氏溫度

Python 攝氏溫度轉(zhuǎn)華氏溫度 Python3 實(shí)例 以下實(shí)例演示了如何將攝氏溫度轉(zhuǎn)華氏溫度: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 用戶輸入攝氏溫度 # 接收用戶收入 celsius = float(input('輸入攝氏溫度: ')) # 計(jì)算...

http://www.o2fo.com/python3/python3-celsius-fahrenheit.html

583.Python 交換變量

Python 交換變量 Python3 實(shí)例 以下實(shí)例通過(guò)用戶輸入兩個(gè)變量,并相互交換: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 用戶輸入 x = input('輸入 x 值: ') y = input('輸入 y 值: ') # 創(chuàng)建臨時(shí)變量,并交換 temp...

http://www.o2fo.com/python3/python3-swap-variables.html

584.Python Hello World 實(shí)例

Python3 實(shí)例 以下實(shí)例為學(xué)習(xí)Python的第一個(gè)實(shí)例,即如何輸出"Hello World!": # -*- coding: UTF-8 -*- # Filename : helloworld.py # author by : www.o2fo.com # 該實(shí)例輸出 Hello World! print('Hello World!') 執(zhí)行以上代碼輸出結(jié)果為: Hello World! Python3 實(shí)例 ...

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

585.Python 判斷閏年

Python 判斷閏年 Python3 實(shí)例 以下實(shí)例用于判斷用戶輸入的年份是否為閏年: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com year = int(input("輸入一個(gè)年份: ")) if (year % 4) == 0: if (year % 100) == 0: if (year % 400) == 0: print("{0} 是閏...

http://www.o2fo.com/python3/python3-leap-year.html

586.Python 階乘實(shí)例

Python 階乘實(shí)例 Python3 實(shí)例 整數(shù)的階乘(英語(yǔ):factorial)是所有小于及等于該數(shù)的正整數(shù)的積,0的階乘為1。即:n!=1×2×3×...×n。 # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 通過(guò)用戶輸入數(shù)字計(jì)算階乘 # 獲取用戶...

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

587.Python 隨機(jī)數(shù)生成

Python 隨機(jī)數(shù)生成 Python3 實(shí)例以下實(shí)例演示了如何生成一個(gè)隨機(jī)數(shù):# -*- coding: UTF-8 -*-# Filename : test.py# author by : www.o2fo.com# 生成 0 ~ 9 之間的隨機(jī)數(shù)# 導(dǎo)入 random(隨機(jī)數(shù)) 模塊import randomprint(random.randint(0,9)) 執(zhí)行以上代碼輸...

http://www.o2fo.com/python3/python3-random-number.html

588.Python 九九乘法表

Python 九九乘法表 Python3 實(shí)例 以下實(shí)例演示了如何實(shí)現(xiàn)九九乘法表: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 九九乘法表 for i in range(1, 10): for j in range(1, i+1): print('{}x{}={}\t'.format(i, j, i*j), end='') print(...

http://www.o2fo.com/python3/python3-99-table.html

589.Python 字符串大小寫轉(zhuǎn)換

Python 字符串大小寫轉(zhuǎn)換 Python3 實(shí)例 以下代碼演示了如何將字符串轉(zhuǎn)換為大寫字母,或者將字符串轉(zhuǎn)為小寫字母等: # Filename : test.py # author by : www.o2fo.com str = "www.o2fo.com" print(str.upper()) # 把所有字符中的小寫字母轉(zhuǎn)換...

http://www.o2fo.com/python3/python3-upper-lower.html

590.Python 計(jì)算每個(gè)月天數(shù)

Python 計(jì)算每個(gè)月天數(shù) Python3 實(shí)例 以下代碼通過(guò)導(dǎo)入 calendar 模塊來(lái)計(jì)算每個(gè)月的天數(shù): # Filename : test.py # author by : www.o2fo.com import calendar monthRange = calendar.monthrange(2013,6) print(monthRange) 執(zhí)行以上代碼輸出結(jié)果為: (5, 30) 輸出的是...

http://www.o2fo.com/python3/python3-month-days.html

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

w3cschool 建議您:

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

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

w3cschool 建議您:

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

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

w3cschool 建議您:

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

581.Python3 列表 extend()方法

Python3 列表 描述 extend() 函數(shù)用于在列表末尾一次性追加另一個(gè)序列中的多個(gè)值(用新序列擴(kuò)展原來(lái)的列表)。 不是所有的序列都可以用來(lái)追加的,只能使用與列表結(jié)構(gòu)相近的序列,比如字符串,列表,元組,集合。 語(yǔ)法 extend(...

http://www.o2fo.com/python3/python3-att-list-extend.html

582.Python 攝氏溫度轉(zhuǎn)華氏溫度

Python 攝氏溫度轉(zhuǎn)華氏溫度 Python3 實(shí)例 以下實(shí)例演示了如何將攝氏溫度轉(zhuǎn)華氏溫度: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 用戶輸入攝氏溫度 # 接收用戶收入 celsius = float(input('輸入攝氏溫度: ')) # 計(jì)算...

http://www.o2fo.com/python3/python3-celsius-fahrenheit.html

583.Python 交換變量

Python 交換變量 Python3 實(shí)例 以下實(shí)例通過(guò)用戶輸入兩個(gè)變量,并相互交換: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 用戶輸入 x = input('輸入 x 值: ') y = input('輸入 y 值: ') # 創(chuàng)建臨時(shí)變量,并交換 temp...

http://www.o2fo.com/python3/python3-swap-variables.html

584.Python Hello World 實(shí)例

Python3 實(shí)例 以下實(shí)例為學(xué)習(xí)Python的第一個(gè)實(shí)例,即如何輸出"Hello World!": # -*- coding: UTF-8 -*- # Filename : helloworld.py # author by : www.o2fo.com # 該實(shí)例輸出 Hello World! print('Hello World!') 執(zhí)行以上代碼輸出結(jié)果為: Hello World! Python3 實(shí)例 ...

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

585.Python 判斷閏年

Python 判斷閏年 Python3 實(shí)例 以下實(shí)例用于判斷用戶輸入的年份是否為閏年: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com year = int(input("輸入一個(gè)年份: ")) if (year % 4) == 0: if (year % 100) == 0: if (year % 400) == 0: print("{0} 是閏...

http://www.o2fo.com/python3/python3-leap-year.html

586.Python 階乘實(shí)例

Python 階乘實(shí)例 Python3 實(shí)例 整數(shù)的階乘(英語(yǔ):factorial)是所有小于及等于該數(shù)的正整數(shù)的積,0的階乘為1。即:n!=1×2×3×...×n。 # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 通過(guò)用戶輸入數(shù)字計(jì)算階乘 # 獲取用戶...

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

587.Python 隨機(jī)數(shù)生成

Python 隨機(jī)數(shù)生成 Python3 實(shí)例以下實(shí)例演示了如何生成一個(gè)隨機(jī)數(shù):# -*- coding: UTF-8 -*-# Filename : test.py# author by : www.o2fo.com# 生成 0 ~ 9 之間的隨機(jī)數(shù)# 導(dǎo)入 random(隨機(jī)數(shù)) 模塊import randomprint(random.randint(0,9)) 執(zhí)行以上代碼輸...

http://www.o2fo.com/python3/python3-random-number.html

588.Python 九九乘法表

Python 九九乘法表 Python3 實(shí)例 以下實(shí)例演示了如何實(shí)現(xiàn)九九乘法表: # -*- coding: UTF-8 -*- # Filename : test.py # author by : www.o2fo.com # 九九乘法表 for i in range(1, 10): for j in range(1, i+1): print('{}x{}={}\t'.format(i, j, i*j), end='') print(...

http://www.o2fo.com/python3/python3-99-table.html

589.Python 字符串大小寫轉(zhuǎn)換

Python 字符串大小寫轉(zhuǎn)換 Python3 實(shí)例 以下代碼演示了如何將字符串轉(zhuǎn)換為大寫字母,或者將字符串轉(zhuǎn)為小寫字母等: # Filename : test.py # author by : www.o2fo.com str = "www.o2fo.com" print(str.upper()) # 把所有字符中的小寫字母轉(zhuǎn)換...

http://www.o2fo.com/python3/python3-upper-lower.html

590.Python 計(jì)算每個(gè)月天數(shù)

Python 計(jì)算每個(gè)月天數(shù) Python3 實(shí)例 以下代碼通過(guò)導(dǎo)入 calendar 模塊來(lái)計(jì)算每個(gè)月的天數(shù): # Filename : test.py # author by : www.o2fo.com import calendar monthRange = calendar.monthrange(2013,6) print(monthRange) 執(zhí)行以上代碼輸出結(jié)果為: (5, 30) 輸出的是...

http://www.o2fo.com/python3/python3-month-days.html

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

w3cschool 建議您:

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

熱門課程