Python Programming: '*' operator for strings and numbers -- why prices cannot be strings смотреть онлайн
In this video, we take a closer look at the * operator in Python. * used for numbers results in multiplication. * used for strings along with an integer results in the string getting repeated. We take several examples. We also use this discussion to elaborate why the list prices must contain floating point values and not strings.
Other videos in the series
Shopping Cart part 1
1. Introduction to the Shopping Cart part 1: Lists, while loop, data types- https://youtu.be/wJpnV3JrbYg
2. Creating the lists menu and price in the Shopping Cart project- https://youtu.be/-BTR61sx2Dg
3. How to index and slice lists using positive and negative numbers?- https://youtu.be/akVoO_YPJl4
4. How to display the menu items and prices on the screen?- https://youtu.be/hkmc0vYGpHc
5. How to allow user to place a single order at the online shop?- https://youtu.be/AhIoTUJO3WY
6. Using while loop along with if-elif-else to allow user to order again and again?- https://youtu.be/Q_f8l5lDGXw
7. Visualizing the list interactions in the Shopping Cart project - https://youtu.be/JYWsZmzf7_w
8. How to add new items to the shopping cart and shopping quant lists using append - https://youtu.be/2cVd-Y6SfeE
9. How to update the list shopping_quant when user orders the same item again? https://youtu.be/aPVh51_iW-4
10. Display shopping cart -- items, quantity and unit price using list indexing - https://youtu.be/_YhuuKRo5VI
11. Using '*' and round() to display the total price per item and grand total- https://youtu.be/ltLe1TzfU6U
12. '*' operator for strings and numbers -- why prices cannot be strings-https://youtu.be/rMEQXXMsiwQ
Shopping Cart Part 2
1. Introducing Shopping Cart Part 2: Concept of Discounts - https://www.youtube.com/watch?v=6oWjUWxBA1A
2. What is the floor division operator, with examples? - https://www.youtube.com/watch?v=npAWeGT6lDo&t
3. What are division, floor division and modulo operators? - https://www.youtube.com/watch?v=UMNOKu6WeQY&t
4. floor division operator to find the next multiple of 500 for offering discount - https://www.youtube.com/watch?v=LvBmLk3p79I&t
5. Offering discount to the user in the shopping cart activity - https://www.youtube.com/watch?v=XIxFnVJmlBA&t
6. Visualizing the list add_quant to offer discounts in the Shopping Cart activity - https://youtu.be/T64NRAXMNFw
7. Populating and displaying the list add_quant in the Shopping Cart activity - https://youtu.be/YGhTSJVInWo
8. How to update the shopping cart based on the user's preference for discount - https://youtu.be/axemCEGNY4s
9. Printing the final bill, after discount and tax in the Shopping Cart activity - https://youtu.be/gNCqLeE8fwE
10. Is our discount scheme in Shopping Cart really smart? How to improve it. - https://youtu.be/aNgXuqy13Zw
The final project can be found - https://replit.com/@vineetforwibyte/ShoppingCart#main.py
Checkout more interesting projects for learning Python on our course website here - https://wibyte.in/python-class-course-material/
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python Programming: '*' operator for strings and numbers -- why prices cannot be strings» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.