自制七段数码管源码
作者:互联网
1 import time 2 import turtle 3 def getdate():#获取日期 4 gmtime=time.gmtime() 5 date=time.strftime("%Y%m%d %H:%M:%S",gmtime) 6 date=date[:8] 7 return date 8 def num0(): 9 def num1(): 10 def num2(): 11 def num3(): 12 def num4(): 13 def num5(): 14 def num6(): 15 def num7(): 16 def num8(): 17 def num9(): 18 def main(): 19 date=getdate() 20 for i in date 21 if i=="0": 22 num0() 23 elif i=="1": 24 num1() 25 elif i=="2": 26 num2() 27 elif i=="3": 28 num3() 29 elif i=="4": 30 num4() 31 elif i=="5": 32 num5() 33 elif i=="6": 34 num6() 35 elif i=="7": 36 num7() 37 elif i=="8": 38 num8() 39 elif i=="9": 40 num9() 41 main()
标签:elif,gmtime,num6,数码管,源码,七段,time,date,def 来源: https://www.cnblogs.com/hirasawayui/p/12527463.html