App下載

詞條

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

191.Python 練習(xí)實(shí)例48

Python 練習(xí)實(shí)例48 Python 100例 題目:數(shù)字比較。 程序分析:無 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': i = 10 j = 20 if i > j: print '%d 大于 %d' % (i,j) elif i == j: print '%d 等于 %d' % (i,j) elif i &l...

http://www.o2fo.com/python/python-exercise-example48.html

192.Python 練習(xí)實(shí)例58

Python 練習(xí)實(shí)例58 Python 100例 題目:畫圖,學(xué)用rectangle畫方形。    程序分析: rectangle(int left, int top, int right, int bottom) 參數(shù)說明:(left ,top )為矩形的左上坐標(biāo),(right,bottom)為矩形的右下坐標(biāo),兩者可確定一個(gè)矩形的大小 程序...

http://www.o2fo.com/python/python-exercise-example58.html

193.Python 練習(xí)實(shí)例39

Python 練習(xí)實(shí)例39 Python 100例 題目:有一個(gè)已經(jīng)排好序的數(shù)組。現(xiàn)輸入一個(gè)數(shù),要求按原來的規(guī)律將它插入數(shù)組中。 程序分析:首先判斷此數(shù)是否大于最后一個(gè)數(shù),然后再考慮插入中間的數(shù)的情況,插入后此元素之后的數(shù),依次...

http://www.o2fo.com/python/python-exercise-example39.html

194.Python 練習(xí)實(shí)例49

Python 練習(xí)實(shí)例49 Python 100例 題目:使用lambda來創(chuàng)建匿名函數(shù)。 程序分析:無 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- MAXIMUM = lambda x,y : (x > y) * x + (x < y) * y MINIMUM = lambda x,y : (x > y) * y + (x < y) * x if __name__ == '__mai...

http://www.o2fo.com/python/python-exercise-example49.html

195.Python 練習(xí)實(shí)例40

Python 練習(xí)實(shí)例40 Python 100例 題目:將一個(gè)數(shù)組逆序輸出。 程序分析:用第一個(gè)與最后一個(gè)交換。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = [9,6,5,4,1] N = len(a) print a for i in range(len(a) / 2): a[i],a[N - ...

http://www.o2fo.com/python/python-exercise-example40.html

196.Python 練習(xí)實(shí)例50

Python 練習(xí)實(shí)例50 Python 100例 題目:輸出一個(gè)隨機(jī)數(shù)。 程序分析:使用 random 模塊。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- import random #生成 10 到 20 之間的隨機(jī)數(shù) print random.uniform(10, 20) 以上實(shí)例輸出結(jié)果為: 14.4012371357 Py...

http://www.o2fo.com/python/python-exercise-example50.html

197.Python 練習(xí)實(shí)例60

Python 練習(xí)實(shí)例60 Python 100例 題目:計(jì)算字符串長度。   程序分析:無。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- sStr1 = 'strlen' print len(sStr1) 以上實(shí)例輸出結(jié)果為: 6 Python 100例

http://www.o2fo.com/python/python-exercise-example60.html

198.Python 練習(xí)實(shí)例41

Python 練習(xí)實(shí)例41 Python 100例 題目:模仿靜態(tài)變量的用法。 程序分析:無。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- def varfunc(): var = 0 print 'var = %d' % var var += 1 if __name__ == '__main__': for i in range(3): varfunc() # 類的屬...

http://www.o2fo.com/python/python-exercise-example41.html

199.Python 練習(xí)實(shí)例51

Python 練習(xí)實(shí)例51 Python 100例 題目:學(xué)習(xí)使用按位與 & 。 程序分析:0&0=0; 0&1=0; 1&0=0; 1&1=1。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = 077 b = a & 3 print 'a & b = %d' % b b &= 7 print 'a & b = %d' % ...

http://www.o2fo.com/python/python-exercise-example51.html

200.Python 練習(xí)實(shí)例61

Python 練習(xí)實(shí)例61 Python 100例 題目:打印出楊輝三角形(要求打印出10行如下圖)?! ?程序分析:無。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = [] for i in range(10): a.append([]) for j in range(10): a[i].ap...

http://www.o2fo.com/python/python-exercise-example61.html

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

w3cschool 建議您:

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

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

w3cschool 建議您:

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

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

w3cschool 建議您:

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

191.Python 練習(xí)實(shí)例48

Python 練習(xí)實(shí)例48 Python 100例 題目:數(shù)字比較。 程序分析:無 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': i = 10 j = 20 if i > j: print '%d 大于 %d' % (i,j) elif i == j: print '%d 等于 %d' % (i,j) elif i &l...

http://www.o2fo.com/python/python-exercise-example48.html

192.Python 練習(xí)實(shí)例58

Python 練習(xí)實(shí)例58 Python 100例 題目:畫圖,學(xué)用rectangle畫方形?!  ?程序分析: rectangle(int left, int top, int right, int bottom) 參數(shù)說明:(left ,top )為矩形的左上坐標(biāo),(right,bottom)為矩形的右下坐標(biāo),兩者可確定一個(gè)矩形的大小 程序...

http://www.o2fo.com/python/python-exercise-example58.html

193.Python 練習(xí)實(shí)例39

Python 練習(xí)實(shí)例39 Python 100例 題目:有一個(gè)已經(jīng)排好序的數(shù)組。現(xiàn)輸入一個(gè)數(shù),要求按原來的規(guī)律將它插入數(shù)組中。 程序分析:首先判斷此數(shù)是否大于最后一個(gè)數(shù),然后再考慮插入中間的數(shù)的情況,插入后此元素之后的數(shù),依次...

http://www.o2fo.com/python/python-exercise-example39.html

194.Python 練習(xí)實(shí)例49

Python 練習(xí)實(shí)例49 Python 100例 題目:使用lambda來創(chuàng)建匿名函數(shù)。 程序分析:無 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- MAXIMUM = lambda x,y : (x > y) * x + (x < y) * y MINIMUM = lambda x,y : (x > y) * y + (x < y) * x if __name__ == '__mai...

http://www.o2fo.com/python/python-exercise-example49.html

195.Python 練習(xí)實(shí)例40

Python 練習(xí)實(shí)例40 Python 100例 題目:將一個(gè)數(shù)組逆序輸出。 程序分析:用第一個(gè)與最后一個(gè)交換。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = [9,6,5,4,1] N = len(a) print a for i in range(len(a) / 2): a[i],a[N - ...

http://www.o2fo.com/python/python-exercise-example40.html

196.Python 練習(xí)實(shí)例50

Python 練習(xí)實(shí)例50 Python 100例 題目:輸出一個(gè)隨機(jī)數(shù)。 程序分析:使用 random 模塊。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- import random #生成 10 到 20 之間的隨機(jī)數(shù) print random.uniform(10, 20) 以上實(shí)例輸出結(jié)果為: 14.4012371357 Py...

http://www.o2fo.com/python/python-exercise-example50.html

197.Python 練習(xí)實(shí)例60

Python 練習(xí)實(shí)例60 Python 100例 題目:計(jì)算字符串長度?! ?程序分析:無。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- sStr1 = 'strlen' print len(sStr1) 以上實(shí)例輸出結(jié)果為: 6 Python 100例

http://www.o2fo.com/python/python-exercise-example60.html

198.Python 練習(xí)實(shí)例41

Python 練習(xí)實(shí)例41 Python 100例 題目:模仿靜態(tài)變量的用法。 程序分析:無。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- def varfunc(): var = 0 print 'var = %d' % var var += 1 if __name__ == '__main__': for i in range(3): varfunc() # 類的屬...

http://www.o2fo.com/python/python-exercise-example41.html

199.Python 練習(xí)實(shí)例51

Python 練習(xí)實(shí)例51 Python 100例 題目:學(xué)習(xí)使用按位與 & 。 程序分析:0&0=0; 0&1=0; 1&0=0; 1&1=1。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = 077 b = a & 3 print 'a & b = %d' % b b &= 7 print 'a & b = %d' % ...

http://www.o2fo.com/python/python-exercise-example51.html

200.Python 練習(xí)實(shí)例61

Python 練習(xí)實(shí)例61 Python 100例 題目:打印出楊輝三角形(要求打印出10行如下圖)。   程序分析:無。 程序源代碼: #!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': a = [] for i in range(10): a.append([]) for j in range(10): a[i].ap...

http://www.o2fo.com/python/python-exercise-example61.html

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

w3cschool 建議您:

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

熱門課程