- ÌâÄ¿ÒªÇó:
¸ù¾ÝÒµÎñÐèÇó,ÏÖÒªÇ󿪷¢Ò»¸ö»õ±Ò¶Ò»»µÄ·þÎñϵͳ,¾ßÌåÒªÇóÈçÏÂ: 1¡¢ÊµÏÖÈËÃñ±Ò¶Ò»»ÃÀÔªµÄ¹¦ÄÜ 2¡¢ÊµÏÖÃÀÔª¶Ò»»ÈËÃñ±ÒµÄ¹¦ÄÜ 3¡¢ÊµÏÖÈËÃñ±Ò¶Ò»»Å·ÔªµÄ¹¦ÄÜ 4¡¢1ÃÀÔª=7.06ÈËÃñ±Ò,1ÈËÃñ±Ò=0.12Å·Ôª 5¡¢ÔÚ¶Ò»»ºó±£Áô2λСÊý 6¡¢ÔÚÊäÈëҪѡÔñ·þÎñºóÓв¨ÀËÏß·Ö¸ô;±¾´Î¶Ò»»·þÎñ½áÊøºóÓеȺÅÏß½øÐзָô¡£ - ÔËÐÐЧ¹ûͼ:
**********»¶ÓʹÓûõ±Òת»»·þÎñϵͳ**********
1.ÈËÃñ±Òת»»ÃÀÔª
2.ÃÀԪת»»ÈËÃñ±Ò
3.ÈËÃñ±Òת»»Å·Ôª
0.½áÊø³ÌÐò
ÇëÄúÑ¡ÔñÐèÒªµÄ·þÎñ:
1
~~~~~~~~~~~~~~~~~
»¶ÓʹÓÃÈËÃñ±Òת»»ÃÀÔª·þÎñ
ÇëÄúÊäÈëÐèҪת»»µÄÈËÃñ±Ò½ð¶î:123
ÄúÐèҪת»»µÄÈËÃñ±ÒΪ:123
¶Ò»»³ÉÃÀԪΪ:17.42$
**********»¶ÓʹÓûõ±Òת»»·þÎñϵͳ**********
1.ÈËÃñ±Òת»»ÃÀÔª
2.ÃÀԪת»»ÈËÃñ±Ò
3.ÈËÃñ±Òת»»Å·Ôª
0.½áÊø³ÌÐò
ÇëÄúÑ¡ÔñÐèÒªµÄ·þÎñ:
0
~~~~~~~~~~~~~~~~~
¸ÐлÄúµÄʹÓÃ,×£ÄúÉú»îÓä¿ì,ÔÙ¼û!
welcome = """
**********»¶ÓʹÓûõ±Òת»»·þÎñϵͳ**********
1.ÈËÃñ±Òת»»ÃÀÔª
2.ÃÀԪת»»ÈËÃñ±Ò
3.ÈËÃñ±Òת»»Å·Ôª
0.½áÊø³ÌÐò
ÇëÄúÑ¡ÔñÐèÒªµÄ·þÎñ:
"""
info_1 = '»¶ÓʹÓÃ{}ת»»{}·þÎñ'
info_2 = 'ÇëÄúÊäÈëÐèҪת»»µÄ{}½ð¶î:'
info_3 = 'ÄúÐèҪת»»µÄ{}Ϊ:{}'
info_4 = '¶Ò»»³É{}Ϊ:{:.2f}{}'
while True:
service_num = int(input(welcome))
if service_num == 1:
print('~~~~~~~~~~~~~~~~~')
print(info_1.format('ÈËÃñ±Ò','ÃÀÔª'))
coin = int(input(info_2.format('ÈËÃñ±Ò')))
print(info_3.format('ÈËÃñ±Ò',coin))
print(info_4.format('ÃÀÔª',coin/7.06,'$'))
elif service_num == 2:
print('~~~~~~~~~~~~~~~~~')
print(info_1.format('ÃÀÔª','ÈËÃñ±Ò'))
coin = int(input(info_2.format('ÃÀÔª')))
print(info_3.format('ÃÀÔª',coin))
print(info_4.format('ÈËÃñ±Ò',coin*7.06,'¥'))
elif service_num == 3:
print('~~~~~~~~~~~~~~~~~')
print(info_1.format('ÈËÃñ±Ò','Å·Ôª'))
coin = int(input(info_2.format('ÈËÃñ±Ò')))
print(info_3.format('ÈËÃñ±Ò',coin))
print(info_4.format('Å·Ôª',coin*0.12,'€'))
elif service_num == 0:
print('~~~~~~~~~~~~~~~~~')
print('¸ÐлÄúµÄʹÓÃ,×£ÄúÉú»îÓä¿ì,ÔÙ¼û!')
break
|