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 Evaluador | |
def evalua(examen,evaluacion) | |
end | |
def busca(pregunta, respuestas) | |
indice = respuestas.index { |item| item["pregunta"] == pregunta} | |
respuestas[indice]["respuesta"] | |
end |
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 Evaluador | |
def evalua(examen,evaluacion) | |
end | |
def busca(pregunta, respuestas) | |
indice = respuestas.index { |item| item["pregunta"] == pregunta} | |
respuestas[indice]["respuesta"] | |
end |
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 Curso | |
def initialize(nombre) | |
@nombre = nombre | |
end | |
end | |
class Alumno | |
end |
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
def par(n) | |
true | |
end | |
describe "Método par" do | |
it "detecta que 4 es par" do | |
expect(par(4)).to eq(true) | |
end | |
it "detecta que 5 es impar" do | |
expect(par(5)).to eq(false) |
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
describe "Figuras" do | |
it "puede crear un rectangulo y devolver pos" do | |
rect = Rect.new(0,0,3,4) | |
expect(rect.pos).to eq([0,0]) | |
end | |
it "puede crear un rectangulo y calcular area" do | |
rect = Rect.new(0,0,3,4) | |
expect(rect.area).to eq(12) | |
end |
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 Primos | |
def descomponer(n) | |
factores = [] | |
# Rellenar el código para que pase las soluciones | |
factores | |
end | |
end | |
describe "Factores primos" do | |
let (:primos) {Primos.new} |
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
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
</head> | |
<body> | |
<h1>Preguntas</h1> |
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
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<body> | |
<h1>Pedido</h1> | |
<xsl:apply-templates /> | |
</body> | |
</html> |
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
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="quiz" > | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="question" type="question" maxOccurs="unbounded"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> |
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
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="pedido"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="producto" minOccurs="1" maxOccurs="200" | |
type="TipoProducto"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> | |
<xs:complexType name="TipoProducto"> |