-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec99cdc
commit 6af14f7
Showing
15 changed files
with
69 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#Primer ejercicio | ||
# ejercicio 1 | ||
|
||
nombre = input("Introduce tu nombre: ") | ||
print("¡Hola " + nombre + "!") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#Tercer ejercicio | ||
# ejercico 3 | ||
|
||
ancho = 17 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#Quinto ejercicio | ||
# ejercicio 5 | ||
|
||
|
||
def calcular_precio_final(importe_sin_iva, tipo_iva): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#Séptimo ejercicio | ||
# ejercicio 7 | ||
|
||
num1 = float(input("Introduce el primer número: ")) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
#Octavo ejercicio | ||
# ejercicio 8 | ||
|
||
num1 = float(input("Introduce el primer número: ")) | ||
|
||
num2 = float(input("Introduce el segundo número: ")) | ||
|
||
num3 = float(input("Introduce el tercer número: ")) | ||
suma = num1 + num2 | ||
|
||
suma = num1 + num2 | ||
suma += num3 | ||
|
||
print("La suma de los tres números es: ", suma) | ||
print("La suma de los numeros es: ", num1 + num2 + float(input("Introduce el tercer número: "))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ejercicio 9 | ||
|
||
print("La suma de los tres números es:", | ||
|
||
float(input("Introduce el primer número: ")) + | ||
float(input("Introduce el segundo número: ")) + | ||
float(input("Introduce el tercer número: "))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ejercicio 10 | ||
|
||
operación = float(((3 + 2) / (2 * 5)) ** 2) | ||
|
||
print("El resultado de la operación es: ", operación) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ejercicio 11 | ||
|
||
n = int(input("Introduce un entero positivo: ")) | ||
|
||
if n > 0: | ||
suma = sum(range(1, n + 1)) | ||
|
||
print(f"La suma de todos los numeros enteros desde 1 hasta {n} es: {suma}") | ||
|
||
else: | ||
print("Por favor,introduzca un entero positivo. ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# ejercicio 12 | ||
|
||
altura = float(input("Introduce tu altura en metros: ")) | ||
|
||
peso = float(input("Introduce tu peso en kilogramos: ")) | ||
|
||
|
||
indice_masa_corporal = (peso / (altura ** 2)) | ||
|
||
print(f"Tu índice de masa corporal es: {indice_masa_corporal:.2f}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ejercicio 13 | ||
|
||
num1_dividendo = int(input("Introduce un número entero: ")) | ||
|
||
num2_divisor = int(input("Introduce un número entero: ")) | ||
|
||
cociente = num1_dividendo // num2_divisor | ||
|
||
resto = num1_dividendo % num2_divisor | ||
|
||
print(f"La división de {num1_dividendo} entre {num2_divisor} da un cociente {cociente} y un resto {resto}.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ejercicio 14 | ||
|
||
payasos = int(input("Escribe el número de payasos vendidos: ")) | ||
|
||
muñecas = int(input("Escribe el número de muñecas vendidas: ")) | ||
|
||
peso_muñecas = 112 | ||
|
||
peso_payasos = 75 | ||
|
||
peso_total = (payasos * peso_payasos) + (muñecas * peso_muñecas) | ||
|
||
print("El peso total del paquete será de: ", peso_total) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# ejercicio 15 |