This article mainly introduces the Python2 implementation of LED large digital display effect, involving Python simple interaction and list-related use tips, the need for friends can refer to the following
In this paper, the LED large digital display effect realized by Python2 is described. Share to everyone for your reference, as follows:
#filename: bignumber.pyzero=[' ******* ', ' * * ', ' * * ', ' * * ', ' * * ', ' * * ', ' ******* ']one=[' * ', ' * ', ' * ', ' * ', ' * ', ' * ', ' * ']two=[' ******* ', ' * ', ' * ', ' ******* ', ' * ', ' * ', ' ******* ']three=[' ******* ', ' * ', ' * ', ' ******* ', ' * ', ' * ', ' ******* ']four=[' * * ', ' * * ', ' * * ', ' ******* ', ' * ', ' * ', ' * ']five=[' ******* ', ' * ', ' * * ' ', ' * ', ' * ', ' ******* ']six=[' ******* ', ' * ', ' * ', ' ******* ', ' * * ', ' * * ', ' ******* ']seven=[' ******* ', ' * ', ' * ', ' * ', ' * ', ' * ', ' * ']eight=[' ******* ', ' * * ', ' * * ', ' ******* ', ' * * ', ' * * ', ' ******* ']nine=[' ******* ', ' * * ', ' * * ', ' ******* ', ' * ', ' * ', ' ******* ']numarr=[zero,one,two,three,four,five,six,seven,eight,nine]while true:try: #input a number num = Raw_input ("Enter a number:") for I in Range (0,7): line= ' j=0 while J<len (n UM): N=int (Num[j]) line+=numarr[n][i]+ "J+=1 print line except ValueError as Err:print er R
Operating effects such as: