|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
0.yes
1.A is bool type,result is 1,B is 250is not
2.dont know
3.True
4.no false has 3 type,none ,0number,and none jihe
5.4
6.1
------------------------------
0.
1.
year = int(input("please input year number:"))
if (year%4 == 0 and year%100 != 0) or (year % 400 == 0):
print(str(year) + " is leap year!")
else:
print(str(year) + " is not leap year!")
*****************************
1.no diffrent
2.yes
4.yes
--------------------------
0.
>>> from fractions import Fraction
>>> Fraction(1708227363155544, 4636617128565048)
Fraction(7, 19)
1.
year = input('请输入一个年份:')
while not year.isdigit():
year = input("抱歉,您的输入有误,请输入一个整数:")
year = int(year)
if year % 400 == 0:
print(year, "是闰年!")
else:
if year % 4 == 0 and year % 100 != 0:
print(year, "是闰年!")
else:
print(year, "不是闰年!")
|
|