This file contains hidden or 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
| class Employee: | |
| def __init__(cls, name: str, id: int, gender: str, salary: int): | |
| cls.name = name | |
| cls.id = id | |
| cls.gender = gender | |
| cls.salary = salary | |
| def toString(self) -> str: | |
| return "- {0} ({1}) - C.C. {2} - Salario: ${3}".format(self.name, self.gender, self.id, self.salary) |
This file contains hidden or 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
| import math | |
| def menu(): | |
| print("Taller Estructura Secuencial - Pseudocódigo\n") | |
| num_option = None | |
| while num_option is None: | |
| option = input("> Elige un número del 1 al 16 para ver el ejercicio (Escribe ':q' para salir): ") | |
| if option == ':q': | |
| break |
This file contains hidden or 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
| const greetToAll = () => "Hola mundo"; | |
| const greetTo = name => { | |
| if (typeof name !== 'string') return "Nombre no válido"; | |
| const message = `Hola, ${name}, tu nombre tiene ${name.length} letras`; | |
| return message; | |
| }; |
This file contains hidden or 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
| // Sumar y encontrar el promedio de los números entre 1 y 100 mediante: a) estructura “Do - While”; b) estructura “For”. | |
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int main() { | |
| // Suma con Do-While. | |
| int i = 1, suma = 0; |
This file contains hidden or 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
| // Calcular el monto a pagar por el servicio de estacionamiento, teniendo en cuenta | |
| // que por la primera hora de estadía se paga una tarifa de $3.500 y las restantes | |
| // tienen un costo de $5.000. Se tiene como datos: hora de entrada y hora de salida; | |
| // iniciada una hora se contabiliza como una hora completa. | |
| Algoritmo Punto1 | |
| Definir horaEntrada, horaSalida, precio, horas Como Real | |
| Escribir "Las horas deben ir en el siguiente formato: hora.minuto" | |
This file contains hidden or 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
| # Haga un programa para calcular el costo de video streaming por demanda. | |
| # El algoritmo recibirá el momento en que inició y terminó la reproducción | |
| # de videos, mediante dos números enteros de máximo 6 digitos que representan | |
| # las horas (00-23), los minutos (00-59) y los segundos (00-59). El costo | |
| # del servicio es de $2 pesos por segundo, con un cobro mínimo de $1000 pesos. | |
| # Por ejemplo, si los tiempos de inicio y fin son 23754 y 130231, el costo del | |
| # servicio será de $74954 pesos. | |
| # | |
| # Ejemplo de ejecución en terminal: | |
| # >>> solucion_ejercicio_logica_1.py |