White school python-day05- work (shopping cart program)

Demand cart:

Start typing wages, and then there's information to purchase goods, enter the number to make a purchase

Inadequate price> prompt pay the balance of the price <wages prompt success to the cart, and show the balance

Then buy links to loop until the user exits purchase

And then prompts the user to purchase goods summary information, the total amount of the purchase, balance and other information.

I am currently learning five days, can do the following extent, hope for criticism:

 

note:

the enumerate () function is used to traverse a data object (such as a list, string, or tuples) as a combination index sequence, while the data lists and data standard, which is generally used in a for loop.

len () method returns the object (character, a list, a tuple, etc.) or the length of the number of items, from the beginning.

 

Guess you like

Origin www.cnblogs.com/zrh058/p/11241202.html