Commit 652e18ea by BellCodeEditor

auto save

parent 370cf254
Showing with 24 additions and 6 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) """
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) 输入某年某月某日,判断这一天是这年的第几天
eg:以3月5日为例,前面有两个月要加起来,然后再加上5,
特殊情况,需要判断闰年,闰年2月多一天
闰年判断: 整百年能被400整除,非整百年能被4整除,不能被100整除。
"""
year = int(input("请输入年份:"))
month = int(input("请输入月份:"))
day = int(input("请输入日:"))
# 请用input()实现用户输入账号、密码的功能 months = [0,31,59,90,120,151,181,212,243,273,304,334]
print("您输入的是%d年%d月%d日"%(year,month,day))
if ( (year%400)==0 or ((year%4)==0 and (year%100) !=0 )):
# 如果用户输入的账号、密码正确,提示登陆成功 print("是闰年")
\ No newline at end of file rday=1
else:
print("不是闰年")
rday=0
sumday = months[month-1] + day +rday
print("是第%d天"%sumday)
\ No newline at end of file
print("123","456","789","abc",end="\t")
print("123","456","789","abc",sep=',')
print("123","456","789","abc",sep='Hi')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment