上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 35 下一页

2017年11月30日

摘要: # 可以设置颜色,g代表green, r代表red,y代表yellow,b代表blue# linewidth = 5,设置线条粗细 # label 设置线条名称 ##plt.plot(x,y,'b',linewidth=5,label='Line One')##plt.plot(x1,y1,'r', 阅读全文
posted @ 2017-11-30 13:36 sunny_2016 阅读(228) 评论(0) 推荐(0)

2017年11月29日

摘要: #coding=utf-8#python2.7实现 from selenium import webdriver import re dr = webdriver.Chrome() dr.maximize_window() dr.implicitly_wait(6) dr.get("http://h 阅读全文
posted @ 2017-11-29 13:10 sunny_2016 阅读(143) 评论(0) 推荐(0)

2017年11月25日

摘要: #比较大小#name:maxNumber.py#比较两个数大小#C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\Lib\site-packagesdef maxTwo(x,y): if x > y: print(x) else: 阅读全文
posted @ 2017-11-25 13:41 sunny_2016 阅读(119) 评论(0) 推荐(0)
摘要: #元组和列表 #元组定义x = 5,6,2,6 #or x = (5,6,2,6) #列表定义 y = [5,6,2,6] # 元组的使用,我们用return语句来演示 def exampleFunc(): return (15,6)a,b = exampleFunc()print (a,b) pr 阅读全文
posted @ 2017-11-25 13:40 sunny_2016 阅读(122) 评论(0) 推荐(0)
摘要: class calculator: def add(x,y): return x + y print(added) def sub(x,y): return x - y print(sub) def mul(x,y): return x * y print(mul) def div(x,y): re 阅读全文
posted @ 2017-11-25 13:18 sunny_2016 阅读(140) 评论(0) 推荐(0)
摘要: ##全局变量与局部变量x = 6 def printFuc(): y = 8 z =9 print(y + z) print(x) printFuc()#print(y)#常见错误##name = "Anthony"##print(Name) #文件写入 text = "Sample Text to 阅读全文
posted @ 2017-11-25 13:01 sunny_2016 阅读(102) 评论(0) 推荐(0)

2017年11月24日

摘要: #if else示例x = 5y = 8 if x > y: print("x is greater than y")else: print("x is not greater than y") print(" ")#if-elif-elsex = 15y = 18z = 15 if x > y: 阅读全文
posted @ 2017-11-24 14:13 sunny_2016 阅读(147) 评论(0) 推荐(0)
摘要: print ("Hello Pythoh3")print('我喜欢"香蕉"')print('we\'ar go to shoping.')print("我们发现这个\"地方\"不一样")print("Hi" + "Tom")##print("Hi" + 5)print("Hi" + str(5))p 阅读全文
posted @ 2017-11-24 13:27 sunny_2016 阅读(296) 评论(0) 推荐(0)

2017年11月21日

摘要: public class TestString { public static void main(String[] args) { // TODO Auto-generated method stub String s1 = "Hello world"; if(!s1.isEmpty()){ Sy 阅读全文
posted @ 2017-11-21 13:42 sunny_2016 阅读(117) 评论(0) 推荐(0)
摘要: public class TestString2 { public static void main(String[] args) { //判断两字符串是否相等 String s1 = "Hello world"; String s2 = "Hello java"; if (s1.equals(s2 阅读全文
posted @ 2017-11-21 13:41 sunny_2016 阅读(96) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 35 下一页

导航