Зміст курсу
Вступ до Python
Вступ до Python
3. Умовні Оператори
Логічний Тип ДанихЧелендж: Оператори ПорівнянняКомбінування УмовЧелендж: Логічні ОператориОператори Приналежності та Перевірка Типів ЗміннихПрості Вирази if/elseЧелендж: Продуктовий МагазинЧелендж: Парне і НепарнеВирази if/elif/elseЧелендж: Продуктовий Магазин 2Челендж: Додатні, Від'ємні та Нульові Значення
Підводимо Підсумки
Завдання
Swipe to start coding
- Print a title
"Shopping Receipt"
and a divider line (using-
) withprint()
. - Print the price for the first item:
- It is priced per weight at $162 per unit.
- The customer bought 0.35 of it.
- Calculate and print the total price for this item.
- Print the price for the second item:
- Originally $25, but comes with a discount of $3.67.
- Calculate and print the final price after the discount.
- Print the subtotal, tax (8%), and total price using
print()
.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 5
Підводимо Підсумки
Завдання
Swipe to start coding
- Print a title
"Shopping Receipt"
and a divider line (using-
) withprint()
. - Print the price for the first item:
- It is priced per weight at $162 per unit.
- The customer bought 0.35 of it.
- Calculate and print the total price for this item.
- Print the price for the second item:
- Originally $25, but comes with a discount of $3.67.
- Calculate and print the final price after the discount.
- Print the subtotal, tax (8%), and total price using
print()
.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 5