Program Requirements:1. Enter your salary2. Products can be selected according to the product number3. You can display the balance after each purchase1shopping_list=[]2products_list=[3("Ipone6", 4000 ),4("Mac Pro", 5000 ),5("Python Book", 80),6("Bike", 1200),7("Coffee", 20),8("Drink", 10)9 ]TenSalary=input ("Input your Salary:") One ifsalary.isdigit (): Asalary=Int (Salary) - whileTrue: - forIndex,iteminchEnumerate (products_list): the
Example of the shopping cart program. The number of purchased items can be displayed.
Goods_list = [("IphoneX", 9000), ("Tesla", 700000), ("Python book", 55 ),("Coffee", 35), ("Computer", 6999), ("Bitcoin", 67000), ("Food", 20), ("TV", 5000)]Shopping_car = []Cost = 0.0
Print ("Welcome to the shopping market, here is yo
Python implements the Shopping System (example) and python Shopping System
Requirements:
User Portal
1. The product information is stored in the file.2. purchased items and balance records.
Merchant portal
You can add products and modify product prices.
Code:
Merchant portal:
# Author: p j Jimport osps = ''' 1 >>>>>>>
First, the demand1. Analog implementation of an ATM + shopping mall Program1). realization function1. Quota 15000 or Custom2. Implement the shopping mall, buy things into the shopping cart, call the credit card interface checkout3. Can withdraw cash, handling fee 5%4. Monthly billing 22nd, 10th monthly repayment day, o
Python implements the Credit Card System (supports shopping, transfers, and money access) and python credit card
Recently, I have been working on a project on the credit card system, and I seldom say hello to anyone. Today, I should have told you that this project is based on the python programming language, this credi
This article mainly introduces Python's implementation of credit card systems (supporting shopping, transfers, and money access). It is very good and has reference value, for more information about credit card systems, please refer to the projects you have been working on recently. I would like to say hello to everyone, and I should give you a message today, this project is based on the python programming l
I. Scripting requirements
After starting the program, let the user enter the payroll, and then print the list of items;
Allows the user to purchase goods according to the product number;
After the user selects the product, checks whether the balance is enough, enough on the direct debit, insufficient on the reminder;
Checkout cart, print purchased goods and balances;
May withdraw from the program at any time;
Two. Knowled
ATM logging operation log provides management interface, including adding accounts, user quotas, freezing accounts, etc... Decorator directory structure for user authentication: ATM job ├──README├──ATM#ATM Master Directory│├──bin#ATM Execution File directory││├──__init__. py││├──atm_start.py#ATM Main program Execution program│││├──conf#configuration file││├──__init__. py││└──settings.py#not used│├──core#The main program logic is in this directory.││├──__init__. py││├──auth.py#user, credit card,
balance is:%d '%self.money) num=int (Input (' Please enter the item number: ') num-=1 if Self.goods[num ["Name"] in Self.shopping_cart.keys (): #goods [num]["name"] Take the product name Self.shopping_cart[self.goods[num ["Name"]][' n ']+=1 #商品数量 +1 else:self.shopping_cart[self.goods[num]["name"]]={"price": SE lf.goods[num]["Price"], ' n ': 1,} # Create shopping cart Dictionary {keys{"prices": Cost, Quanti
Shopping Cart Requirements: The user name and password are stored in the file to start the program, log in, log in successfully let the user enter the salary, and then print the list of items, failure to log in again, more than three times the exit program allows users to buy goods based on the product number of the user to select goods, check the balance is sufficient, Enough to dir
First, the Python shopping process scriptMore than half a month of Python study, spent a day to finally write a simple shopping process script, but also a summary of Python and knowledge of the review, I am very dishes, scripts are very general.#!/usr/bin/envpython#descriptm
"Software Description Precautions "1. Shopping Malls ATM Program Development environment: OS:64 bit Windows7IDE:PYCHARM4.0.4python version:3.5.132 Guests2, shopping mall AMP;ATM program only to do Python learning use, copyright has the author, without the author's consent, may not be this shopping mall ATM programs are
1 #Shopping mall2 #product display, price3 #buy items, add to cart, always add4 #payment, you have 4000 yuan, not enough money, on the withdrawal of orders. 5 6Items = {'CPU':' -','Motherboard':' -','Chassis':' -','video card':' -','keyboard':' -','Headphones':' -'}7Cost_list =Items.items ()8 Print(cost_list)9Cost_items = {}Ten whileTrue: OneItem_name = input ('Please enter the name of the product you want
Python example of a shopping cart1#!/usr/bin/env python2#-*-Coding:utf-8-*-3‘‘‘Shopping Cart‘‘‘45 goods =[67 {"Name":"Computer","Price": 1999},89 {"Name":"Mouse","Price": 10},1011 {"Name":"Yacht","Price": 20},1213 {"Name":"Beauty","Price": 998},1415]cart_dict={}17Black=int (Input (‘Please enter your balance:‘))1920For
# Author:eric Zhao#-*-Coding:utf-8-*-"Demand:After you start the program, let the user enter the payroll, and then print the list of itemsAllow users to purchase items based on their product numberAfter the user selects the product, checks whether the balance is enough, enough on the direct debit, enough to remindCan exit at any time, when you exit, print the purchased goods and the balance "Product_list = [(' IPhone ', 5000),(' Bike ', 500),(' Car ', 50000),(' Hat ', 50)]Shopping_list = []Salar
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.