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
""" Escribir una función que aplique un descuento a un precio y otra que aplique el IVA | |
a un precio. Escribir una tercera función que reciba un diccionario con los precios y | |
porcentajes de una cesta de la compra, y una de las funciones anteriores, y utilice | |
la función pasada para aplicar los descuentos o el IVA a los productos de la cesta y | |
devolver el precio final de la cesta. """ | |
#Con esta función obtenemos el precio final después de ser aplicado el IVA que sea a una cantidad dada. | |
def aplicaIvaCalculaPrecio(precio, porcentaje): | |
return precio * (porcentaje / 100) |
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
#Realiza un programa que proporcione el desglose en billetes y monedas de una | |
#cantidad entera de euros. Recuerda que hay billetes de 500, 200, 100, 50, 20, 10 y | |
#5 euros y monedas de 2 y 1 euros. Debes recorrer los valores de billete y moneda | |
#disponibles con uno o mas bucles for-in. | |
cantidadEntera = float(input("Escribe cantidad de euros:")) | |
cambio = cantidadEntera - 1000 | |
if(cambio >= 1000): |
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
package listener.dao.calificacion; | |
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; | |
import java.util.*; | |
import javax.swing.JTable; | |
import dao.calificacion.DAOcalificaciones; | |
import pojo.calificacion.Calificacion; | |
import javax.swing.table.DefaultTableModel; | |
import jtable.JTableCalificacion; | |
/** |
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
//------------- MODELS ------------- | |
export default class Joke { | |
//Esto sería un modelo (clase) que creamos para tipar un chiste (declaramos como está compuesto un chiste) | |
//Atributos | |
public jkTitle: string; | |
public jkText: string; | |
public hide: boolean; |
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
//------------------ CODE: component.ts ------------------------ | |
import { Component, OnInit } from '@angular/core'; | |
//MODELO DE DOMINIO de nuestra clase JokePoolComponent | |
class Joke{ | |
//Atributos | |
jkTitle: string; | |
jkText: string; |
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
//Función que muestra por consola un array formateado de n tamaño | |
fun escribeArrayInt(arr:IntArray) | |
{ | |
print("[") | |
for(i in arr[0]..arr.size-1) | |
{ | |
print("${i} ,") | |
} | |
print(arr.size) | |
print("]") |
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
using System; | |
using System.Collections.Generic; | |
namespace MatrizContenedoraV4 | |
{ | |
class Program | |
{ | |
public static object Collections { get; private set; } | |
/// <summary> |
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
package com.example.holamundo; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import android.widget.ViewAnimator; |
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
package com.example.holamundo; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import android.widget.Toast; | |
public class MainActivity extends AppCompatActivity | |
{ |
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
using System; | |
namespace MatrizSubMatriz | |
{ | |
class Program | |
{ | |
/// <summary> | |
/// Rellena un array de valores en orden ascendente, comenzando por el 1 | |
/// </summary> | |
/// <param name="a">Array de cualquier tamaño</param> |
NewerOlder