![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python编程
Kerry158
这个作者很懒,什么都没留下…
展开
-
基于python的数字判断程序和字符串判断程序
判断字符串a=input("Enter a String.\n")b='A'if str(a)>b: print("a max!")else: print("b max!")#exit(0)判断数字大小a=input("Enter a NumericNumber.\n")b=18if int(a)>b: print("a max!")else:原创 2016-07-24 10:48:23 · 488 阅读 · 0 评论 -
珍惜时间
import timei=29548800 #assuem how many seconds you can live in this worldfor a in range(0,i):c=i-atime.sleep(0.5)print("Your life in the world has %d seconds left, Value your time" %c)ti原创 2016-07-24 17:59:10 · 211 阅读 · 0 评论 -
初步涉及类和对象的编程
class A(): def add(self,a,b): return a + b def multiple(self,a,b): return a * b def subtract(self,a,b): return a / b def sub(self,a,b): return a - bclass B(A):原创 2016-07-26 23:32:13 · 177 阅读 · 0 评论 -
基于python的双色球程序
import randoma=random.randint(1,33)b=random.randint(1,33)c=random.randint(1,33)d=random.randint(1,33)e=random.randint(1,33)f=random.randint(1,33)g=random.randint(1,16)if a==b or b==c or c==d原创 2016-07-17 16:55:28 · 1492 阅读 · 0 评论