CPyUG Wiki Logo

ChinesePython/tasting

Login
  • 首页
  • CPUG
  • OpenBookProject
  • 更新
  • 搜索
  • 帮助
  • ChinesePython/tasting

  • Immutable Page
  • Comments
  • Info
  • Attachments

Revision 2 as of 2005-11-20 07:18:32

Clear message
  • 直观的组合出一甲子的年份

    #--GBK--
    天干=("甲","乙","丙","丁","戊","己","庚","辛","壬","葵")
    地支=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
    公元 = 2000
    天干地支 = ""
    取 干 自 天干:
        取 支 自 地支:
            写 干+支
            天干地支 += 干+支+"  "+变字串(公元) 
            公元+=1
    打开('天干地支.txt', 'w').输出(天干地支)        
  • Immutable Page
  • Comments
  • Info
  • Attachments
  • 豆瓣友情赞助