Python implements part of the shopping cart +ATM machine function

Source: Internet
Author: User

Job Requirements:

Analog implementation of a atm+ shopping mall program

1. Quota 15000 or Custom

2. First shopping mall, buy things to add shopping cart, call credit card interface Checkout

3. Can withdraw cash, handling fee 5%

4.22nd monthly Billing, 10th monthly repayment date, overdue, according to the total amount owed 5 interest repayment

4. Support Multi-Account login

5. Support transfer between accounts

6. Record monthly daily consumption flow

7. Provide repayment interface

8.ATM Logging of Operation logs

9. Provide management interface, including adding account, user quota, freezing account, etc...

10. User authentication Decorator



Job Code: Implement 1.2.3.5.7.9 function


Systimedatetimename_list={    :,    :,    :,}store _list={    :,}shop_list= [{: , : },    {: ,  : },    {: , : },    {: , : } ,             ]buy_shop_list=[]login_user ():     count = :        count > :              ()              sys.exit ()         :             user= ()              passwd= ()              names name_list:                user  names passwd == name_list[names]:                      (%names )                      buy_shop ()                    sys.exit ()                 :                      (% Names)                      count += log_other ():     ():         count = :            count > :                  ()                  sys.exit ()              :                 user =  ()                  passwd =  ()                  store_names store_list:                     user  store_names passwd == store_list[store_names]:                          (% store_names)                           sys.exit ()                      :                          (% store_names)                           count += buy_shop ():    wages =  ()           wages =  (wages)      (% wages)     index, item  (shop_list):         ()          (Index,item)     :        shop_ Number= ()           shop_number= (Shop_number)          buy_shop_list.append (Shop_list[shop_number])   buy= ()  buy  == buy == :            :             money=i buy_shop_list:                 money_total= (i[])                 money +=  money_total            money >  wages:            (% (i,money,wages))                  money_less= ()                  money_less == y money_less == y:                      log_other ()                  :                     money_less == N money_less == n:                          sys.exit ()             :                  (% (Buy_shop_list,money))                  (,, =)  f:               time_t= (Time.strftime (,  time.localtime ()))                       F.write (time_t)                      f.write (%money )                  sys.exit () Login_user ()


Python implements part of the shopping cart +ATM machine function

Related Article

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.