24СʱÈÈÃŰæ¿éÅÅÐаñ    

Znn3bq.jpeg
²é¿´: 521  |  »Ø¸´: 0

ɯɯ¼ÓÓÍ

ľ³æ (³õÈëÎÄ̳)


[×ÊÔ´] pythonºËÐĽ̵̳ÚÁùÕ¿κóϰÌâ9µÄ´úÂë

#! /usr/bin/python
num=int(raw_input('Please enter a number at[0~1000]:'))
unit=['zero','one','two','three','four','five','six','seven','eight','night','nine','ten']
ten=['eleven','twele','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen']
tens=['ten','twenty','thirty','fourty','fifty','sixty','seventy','eighty','ninety']
#print num
#print unit
#print ten
#print tens
def engnum(num):
        if num<=10:
                units=unit[num]
                print 'The english number is %s'%units
        elif 10< num <100:
                nuit1=num/10
                nuit2=num%10
                if nuit2==0:
                        print 'The number is %s'%tens[nuit1-1]
                else:
                        print 'The number is %s-%s'%(ten[nuit1-1],unit[nuit2])
        elif 100<=num<1000:
                nuit3=num%10
                ten3=nuit3%10
                hu1=num/100
                if nuit3==0 and ten3==0:
                        print 'The number is %shunder'%unit[hu1]
                elif nuit3==0:
                        print 'The number is %shunder-%s'%(unit[hu1],tens[ten3-1])

                else:
                        print 'The number is :%shunder-%s-%s'%(unit[hu1],tens[ten3-1],unit[unit3])
        else:
                print 'ten-hunder'
engnum(num)
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÖÇÄÜ»úÆ÷ÈË

Robot (super robot)

ÎÒÃǶ¼°®Ð¡Ä¾³æ

ÕÒµ½Ò»Ð©Ïà¹ØµÄ¾«»ªÌû×Ó£¬Ï£ÍûÓÐÓÃŶ~

¿ÆÑдÓСľ³æ¿ªÊ¼£¬ÈËÈËΪÎÒ£¬ÎÒΪÈËÈË
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ ɯɯ¼ÓÓÍ µÄÖ÷Ìâ¸üÐÂ
¡î ÎÞÐǼ¶ ¡ï Ò»ÐǼ¶ ¡ï¡ï¡ï ÈýÐǼ¶ ¡ï¡ï¡ï¡ï¡ï ÎåÐǼ¶
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 22408 312Çóµ÷¼Á +20 ÃÅ·ÃþÃþ 2026-04-14 21/1050 2026-04-15 20:39 by cuisz
[¿¼ÑÐ] 307ÖÐÒ½¿¼Ñе÷¼Á +4 ÓÚÒÔ²ÉÞÀ 2026-04-14 4/200 2026-04-15 19:14 by ANÁ÷800
[¿¼ÑÐ] Çóµ÷¼Á +10 СÄô°®Ñ§Ï° 2026-04-11 14/700 2026-04-15 19:08 by ºÚ¿Æ¼¼»¨¸ÚÑÒ
[¿¼ÑÐ] 291 Çóµ÷¼Á +38 »¯¹¤2026½ì±ÏÒµÉ 2026-04-09 39/1950 2026-04-15 08:03 by ²»ÎÒÀ­ÂÌ¿¨
[¿¼ÑÐ] Ò»Ö¾Ô¸Öйú¿ÆÑ§ÔºÉϺ£ÓлúËù£¬Óлú»¯Ñ§356·ÖÕÒµ÷¼Á +12 Nadiums 2026-04-09 13/650 2026-04-14 17:54 by lhj2009
[¿¼ÑÐ] »¯Ñ§070300 Çóµ÷¼Á +23 ¹þ¹þ¹þ^_^ 2026-04-12 23/1150 2026-04-14 16:30 by zhouxiaoyu
[¿¼ÑÐ] ũѧ0904 312Çóµ÷¼Á +4 Say Never 2026-04-11 4/200 2026-04-14 09:10 by zs92450
[¿¼ÑÐ] ¿¼ÑÐÇóµ÷¼Á +12 ×ÓľÄÅ 2026-04-12 13/650 2026-04-14 01:19 by Íõ¬Bè±
[¿¼ÑÐ] Ò»Ö¾Ô¸ÖÐÄÏ´óѧ 0855 »úе 286 Çóµ÷¼Á +11 ²»»á³ÔÈâ 2026-04-12 11/550 2026-04-13 21:59 by bljnqdcc
[¿¼ÑÐ] 302Çóµ÷¼Á +10 Ò×£¡? 2026-04-13 10/500 2026-04-13 19:04 by lbsjt
[¿¼ÑÐ] 0831Ò»ÂÖµ÷¼Áʧ°ÜÇóÖú +10 СÐÜî£î£_s 2026-04-11 10/500 2026-04-12 22:43 by ³¤¹­°Á
[¿¼ÑÐ] ±¾¿ÆÄÏ·½Ò½¿Æ´óѧ Ò»Ö¾Ô¸985 ҩѧѧ˶284·Ö Çóµ÷¼Á +5 ÈõË®ÌýÎÄ 2026-04-09 5/250 2026-04-12 13:16 by shengxi123
[¿¼ÑÐ] 291Çóµ÷¼Á +8 ¹ØÒä±±. 2026-04-11 8/400 2026-04-12 09:32 by ÄæË®³Ë·ç
[¿¼ÑÐ] 267Çóµ÷¼Á +8 ÔÙæҲҪ³Ô·¹°¡ 2026-04-09 8/400 2026-04-11 21:42 by cfdbai
[¿¼ÑÐ] µç×ÓÐÅÏ¢279Çóµ÷¼Á£¬ÓÐÊé¶Á¾ÍÐÐ +8 wwwooden 2026-04-08 11/550 2026-04-11 20:22 by cq2548
[¿¼ÑÐ] ±¾ÈËÅ®º¢ +7 ºðºð£¬ 2026-04-10 9/450 2026-04-11 14:45 by ACS Nano¡ª¡ª
[¿¼ÑÐ] 284Çóµ÷¼Á +9 ÈÃÎÒÉϰ¶°É°¢Î÷ 2026-04-09 11/550 2026-04-10 19:18 by ¾¸jing
[¿¼ÑÐ] Ò»Ö¾Ô¸¿ó´ó£¬²ÄÁϹ¤³Ìר˶314·Ö£¬0856¿Éµ÷¶¼¿ÉÒÔ +15 ÎÞи¿É»÷µÄ¾ÞÈË 2026-04-09 15/750 2026-04-10 18:10 by hmn_wj
[¿¼ÑÐ] Ò»Ö¾Ô¸»ª¶«Ê¦·¶ÉúÎïѧ326·Ö£¬Çóµ÷¼Á +8 Áõīī 2026-04-09 8/400 2026-04-10 12:00 by pengliang8036
[¿¼ÑÐ] 070300»¯Ñ§ Çóµ÷¼Á +13 73372112 2026-04-08 13/650 2026-04-09 20:22 by maddjdld
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û