Contenido del Curso
Introducción a Python
Introducción a Python
3. Declaraciones Condicionales
Tipo de Datos BooleanosDesafío: Operadores de ComparaciónCombinando CondicionesDesafío: Operadores LógicosComparación de Operadores y Tipos de MembresíaExpresiones simples if/elseDesafío: Tienda de ComestiblesDesafío: Par e ImparExpresiones if/elif/elseDesafío: Tienda de Comestibles 2Desafío: Positivo, Negativo o Cero
Pongámoslo Todo a Prueba
Tarea
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()
.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 5
Pongámoslo Todo a Prueba
Tarea
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()
.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 5