Use Python2 to complete LED display large number of effect instances

Source: Internet
Author: User
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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.