4. Shopping Cart 2: floor division operator to find the next multiple of 500 for offering discount

Опубликовано: 21 Декабрь 2025
на канале: WIBYTE
91
0

In this video, we see how we can use the floor division operator to determine the next multiple of 500 to offer a discount to the user.

Other videos in the series

Shopping Cart part 1
1. Introduction to the Shopping Cart part 1: Lists, while loop, data types-    • 1. Shopping Cart part 1: Introduction  
2. Creating the lists menu and price in the Shopping Cart project-    • 2. Shopping Cart 1: Creating the lists men...  
3. How to index and slice lists using positive and negative numbers?-    • 3. Shopping Cart 1 : How to index and slic...  
4. How to display the menu items and prices on the screen?-    • 4. Shopping Cart 1 : How to display the me...  
5. How to allow user to place a single order at the online shop?-    • 5. Shopping Cart 1: How to allow user to p...  
6. Using while loop along with if-elif-else to allow user to order again and again?-    • 6. Shopping Cart 1: using while loop along...  
7. Visualizing the list interactions in the Shopping Cart project -    • 7. Shopping Cart 1: Visualizing the list i...  
8. How to add new items to the shopping cart and shopping quant lists using append -    • 8. Shopping Cart 1: How to add new items t...  
9. How to update the list shopping_quant when user orders the same item again?    • 9. Shopping Cart 1: How to update the list...  
10. Display shopping cart -- items, quantity and unit price using list indexing -    • 10. Shopping Cart 1: Display shopping cart...  
11. Using '*' and round() to display the total price per item and grand total-    • 11. Shopping Cart 1: Using '*' and round()...  
12. '*' operator for strings and numbers -- why prices cannot be strings-   • 12. Shopping Cart 1: '*' operator for stri...  

Shopping Cart Part 2
1. Introducing Shopping Cart Part 2: Concept of Discounts -    • 1. Shopping Cart Part 2: Introduction and ...  
2. What is the floor division operator, with examples? -    • 2. Shopping Cart 2: What is the floor divi...  
3. What are division, floor division and modulo operators? -    • 3. Shopping Cart 2: What are division, flo...  
4. floor division operator to find the next multiple of 500 for offering discount -    • 4. Shopping Cart 2: floor division operato...  
5. Offering discount to the user in the shopping cart activity -    • 5. Shopping Cart 2: Offering discount to t...  
6. Visualizing the list add_quant to offer discounts in the Shopping Cart activity -    • 6. Shopping Cart2: Visualizing the list ad...  
7. Populating and displaying the list add_quant in the Shopping Cart activity -    • 7. Shopping Cart 2: Populating and display...  
8. How to update the shopping cart based on the user's preference for discount -    • 8. Shopping Cart 2: How to update the shop...  
9. Printing the final bill, after discount and tax in the Shopping Cart activity -    • 9. Shopping Cart 2: Printing the final bil...  
10. Is our discount scheme in Shopping Cart really smart? How to improve it. -    • 10. Shopping Cart 2: Is our discount schem...  

The final project can be found - https://replit.com/@vineetforwibyte/S...

Checkout more interesting projects for learning Python on our course website here - https://wibyte.in/python-class-course...