练习:判断是否为闰年 year=eval(input("请输入年份:"))pd=Trueif year%400==0: pd=Trueelif year%4==0 and year%100!=0: pd = Trueelse: pd=Falseif pd==True: print(str(year) ...
分类:
其他好文 时间:
2021-01-11 10:32:50
阅读次数:
0
# -*- coding: UTF-8 -*- ''' @Project -> File :MyDjango -> cos_upload_demo @IDE :PyCharm @Author :ruochen @Date :2020/7/17 11:52 @Desc : ''' from qclou ...
分类:
其他好文 时间:
2021-01-08 11:43:55
阅读次数:
0
打印1 ~ 100 的奇数和偶数和 sum=0 for i in range(1,100,2): print(i) sum=sum+i print('奇数和为:%s'%(sum)) sum=0 for i in range(0,101,2): print(i) sum=sum+i print('偶数 ...
分类:
编程语言 时间:
2021-01-08 11:39:17
阅读次数:
0
一、kiali 组件分析 使用如下命令查看 kiali pod 详情: kubectl edit pod -n istio-system $(kubectl get pods -n istio-system | grep -i kiali | awk '{print $1}') kiali pod ...
分类:
其他好文 时间:
2021-01-08 10:42:23
阅读次数:
0
1.self指的是类实例对象本身(注意:不是类本身)。 class Person: def _init_(self,name): self.name=name def sayhello(self): print 'My name is:',self.name p=Person('Bill') pri ...
分类:
编程语言 时间:
2021-01-08 10:33:43
阅读次数:
0
private static double PI = 3.14159265358979324;public static double[] gcj02ToWgs(double lng, double lat) { double a = 6378245.0; // a: 卫星椭球坐标投影到平面地图坐标 ...
分类:
移动开发 时间:
2021-01-08 10:32:16
阅读次数:
0
一、pom.xml导入依赖 <dependencies> <!-- activemq 所需要的jar 包--> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <ver ...
import time t=time.time() num=input("输入一个质数:") def prime_number(num): i=2 for i in range(int(num)): i=i*2 num=i-1 print(num) #input()print(time.time() ...
分类:
编程语言 时间:
2021-01-07 12:38:45
阅读次数:
0
二、元类metaclass 实例对象是由类来创建,那么类又是由什么来创建的呢? 答案就是元类 1.类的类型:是元类 元类创建类,类创建对象。 # 元类 print(type(1)) # <class 'int'> print(type(int)) # <class 'type'> 2.理解pytho ...
分类:
Web程序 时间:
2021-01-07 12:13:56
阅读次数:
0
#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: print(a) a = a + 1 #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: a = a ...
分类:
编程语言 时间:
2021-01-07 12:09:58
阅读次数:
0