math-exercises 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +2 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/index.d.ts +2 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/index.js +2 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts +9 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +90 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts +9 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +95 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts +7 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +59 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +77 -0
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/index.js +2 -0
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +18 -4
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts +10 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +81 -0
- package/lib/exercises/math/functions/affines/index.d.ts +1 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +1 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.js +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +3 -3
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.js +29 -4
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +6 -6
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/index.d.ts +1 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/index.js +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts +11 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +99 -0
- package/lib/exercises/pc/chemicalEquations.d.ts +1 -1
- package/lib/exercises/pc/chemicalEquations.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalEquations.js +1 -1
- package/lib/exercises/pc/chemicalReactions/index.d.ts +2 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/index.js +2 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +5 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +69 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts +11 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +180 -0
- package/lib/exercises/pc/chemicalReactionsProduct.d.ts +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts +10 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.js +118 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts +10 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +116 -0
- package/lib/exercises/pc/dosage/index.d.ts +2 -0
- package/lib/exercises/pc/dosage/index.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/index.js +2 -0
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts +8 -0
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateIntensity.js +60 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts +10 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +105 -0
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts +11 -0
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateVoltage.js +143 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts +9 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +80 -0
- package/lib/exercises/pc/electricity/index.d.ts +7 -0
- package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/index.js +7 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts +10 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +110 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts +11 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/ohmLaw.js +122 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +5 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +94 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts +8 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -0
- package/lib/exercises/pc/energy/calorificValue.js +77 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts +8 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +77 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts +11 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +140 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts +8 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.js +83 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts +10 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.js +121 -0
- package/lib/exercises/pc/energy/energyTransfer.d.ts +10 -0
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -0
- package/lib/exercises/pc/energy/energyTransfer.js +67 -0
- package/lib/exercises/pc/energy/index.d.ts +9 -0
- package/lib/exercises/pc/energy/index.d.ts.map +1 -0
- package/lib/exercises/pc/energy/index.js +24 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts +10 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +167 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts +11 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +142 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts +8 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +101 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts +13 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/electroStaticForce.js +116 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts +9 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +131 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +31 -27
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts +10 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +117 -0
- package/lib/exercises/pc/forces/index.d.ts +5 -0
- package/lib/exercises/pc/forces/index.d.ts.map +1 -1
- package/lib/exercises/pc/forces/index.js +6 -0
- package/lib/exercises/pc/forces/massWeight.d.ts +9 -0
- package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -0
- package/lib/exercises/pc/forces/massWeight.js +67 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts +1 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +106 -0
- package/lib/exercises/pc/formulaFromComposition.js +2 -2
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts +8 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +72 -0
- package/lib/exercises/pc/index.d.ts +6 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +6 -0
- package/lib/exercises/pc/molarQuantity.js +2 -2
- package/lib/exercises/pc/mole/index.d.ts +2 -0
- package/lib/exercises/pc/mole/index.d.ts.map +1 -1
- package/lib/exercises/pc/mole/index.js +2 -0
- package/lib/exercises/pc/mole/molarMass.js +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts +9 -0
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts.map +1 -0
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +75 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts +7 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts.map +1 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.js +66 -0
- package/lib/exercises/pc/moleculeFormula.js +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +1 -1
- package/lib/exercises/pc/motion/averageSpeed.d.ts +12 -0
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -0
- package/lib/exercises/pc/motion/averageSpeed.js +121 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts +10 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +145 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts +7 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +86 -0
- package/lib/exercises/pc/motion/index.d.ts +7 -0
- package/lib/exercises/pc/motion/index.d.ts.map +1 -0
- package/lib/exercises/pc/motion/index.js +22 -0
- package/lib/exercises/pc/motion/motionReference.d.ts +9 -0
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -0
- package/lib/exercises/pc/motion/motionReference.js +167 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +5 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.js +97 -0
- package/lib/exercises/pc/motion/typeOfMovement.d.ts +5 -0
- package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -0
- package/lib/exercises/pc/motion/typeOfMovement.js +111 -0
- package/lib/exercises/pc/orderOfMagnitude.d.ts +8 -0
- package/lib/exercises/pc/orderOfMagnitude.d.ts.map +1 -0
- package/lib/exercises/pc/orderOfMagnitude.js +68 -0
- package/lib/exercises/pc/potentialEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/potentialEnergy.js +17 -5
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts +8 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.js +85 -0
- package/lib/exercises/pc/power/index.d.ts +2 -0
- package/lib/exercises/pc/power/index.d.ts.map +1 -0
- package/lib/exercises/pc/power/index.js +17 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +5 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +117 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts +9 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +95 -0
- package/lib/exercises/pc/sound/index.d.ts +1 -0
- package/lib/exercises/pc/sound/index.d.ts.map +1 -1
- package/lib/exercises/pc/sound/index.js +1 -0
- package/lib/exercises/pc/waves/index.d.ts +1 -0
- package/lib/exercises/pc/waves/index.d.ts.map +1 -1
- package/lib/exercises/pc/waves/index.js +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts +10 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.js +160 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts +7 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -0
- package/lib/exercises/pc/weight/calculateWeight.js +72 -0
- package/lib/exercises/pc/weight/index.d.ts +1 -0
- package/lib/exercises/pc/weight/index.d.ts.map +1 -1
- package/lib/exercises/pc/weight/index.js +1 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +6 -6
- package/lib/exercises/utils/getAtoms.d.ts +1 -1
- package/lib/exercises/utils/getAtoms.d.ts.map +1 -1
- package/lib/exercises/utils/getAtoms.js +1 -1
- package/lib/geogebra/deleteObjectNamesFromAnswer.d.ts +1 -1
- package/lib/geogebra/deleteObjectNamesFromAnswer.d.ts.map +1 -1
- package/lib/geogebra/deleteObjectNamesFromAnswer.js +2 -2
- package/lib/index.d.ts +188 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -2
- package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
- package/lib/math/polynomials/affine.d.ts +4 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +10 -0
- package/lib/math/polynomials/trinom.d.ts +2 -1
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +3 -0
- package/lib/pc/constants/atoms.d.ts +0 -1
- package/lib/pc/constants/atoms.d.ts.map +1 -1
- package/lib/pc/constants/atoms.js +2 -2
- package/lib/pc/constants/coulomb.d.ts +3 -0
- package/lib/pc/constants/coulomb.d.ts.map +1 -0
- package/lib/pc/constants/coulomb.js +13 -0
- package/lib/pc/constants/earth.d.ts +0 -1
- package/lib/pc/constants/earth.d.ts.map +1 -1
- package/lib/pc/constants/earth.js +4 -4
- package/lib/pc/constants/gravity.d.ts +1 -1
- package/lib/pc/constants/gravity.d.ts.map +1 -1
- package/lib/pc/constants/gravity.js +16 -7
- package/lib/pc/constants/mechanics/gravitational.d.ts +14 -0
- package/lib/pc/constants/mechanics/gravitational.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/gravitational.js +37 -0
- package/lib/pc/constants/mechanics/planets.d.ts +15 -0
- package/lib/pc/constants/mechanics/planets.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/planets.js +35 -0
- package/lib/pc/constants/mechanics/waves.d.ts +8 -0
- package/lib/pc/constants/mechanics/waves.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/waves.js +8 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts +2 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.js +2 -0
- package/lib/pc/constants/molecularChemistry/atome.d.ts +18 -0
- package/lib/pc/constants/molecularChemistry/atome.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atome.js +174 -0
- package/lib/pc/constants/molecularChemistry/atoms.d.ts +9 -0
- package/lib/pc/constants/molecularChemistry/atoms.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atoms.js +15 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts +25 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/molecule.js +579 -0
- package/lib/pc/constants/molecularChemistry/reaction.d.ts +27 -0
- package/lib/pc/constants/molecularChemistry/reaction.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/reaction.js +471 -0
- package/lib/pc/measure/measure.d.ts +16 -6
- package/lib/pc/measure/measure.d.ts.map +1 -1
- package/lib/pc/measure/measure.js +112 -16
- package/lib/pc/units/AmountOfSubstance.d.ts +17 -0
- package/lib/pc/units/AmountOfSubstance.d.ts.map +1 -0
- package/lib/pc/units/AmountOfSubstance.js +40 -0
- package/lib/pc/units/PressionUnit.d.ts +17 -0
- package/lib/pc/units/PressionUnit.d.ts.map +1 -0
- package/lib/pc/units/PressionUnit.js +32 -0
- package/lib/pc/units/distanceUnits.d.ts +16 -0
- package/lib/pc/units/distanceUnits.d.ts.map +1 -0
- package/lib/pc/units/distanceUnits.js +32 -0
- package/lib/pc/units/divideUnit.d.ts +13 -0
- package/lib/pc/units/divideUnit.d.ts.map +1 -0
- package/lib/pc/units/divideUnit.js +32 -0
- package/lib/pc/units/electricalChargeUnit.d.ts +17 -0
- package/lib/pc/units/electricalChargeUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalChargeUnit.js +40 -0
- package/lib/pc/units/electricalResistanceUnit.d.ts +18 -0
- package/lib/pc/units/electricalResistanceUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalResistanceUnit.js +32 -0
- package/lib/pc/units/electricalUnit.d.ts +18 -0
- package/lib/pc/units/electricalUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalUnit.js +32 -0
- package/lib/pc/units/energyUnit.d.ts +16 -0
- package/lib/pc/units/energyUnit.d.ts.map +1 -0
- package/lib/pc/units/energyUnit.js +32 -0
- package/lib/pc/units/forceUnits.d.ts +16 -0
- package/lib/pc/units/forceUnits.d.ts.map +1 -0
- package/lib/pc/units/forceUnits.js +32 -0
- package/lib/pc/units/frequenceUnit.d.ts +17 -0
- package/lib/pc/units/frequenceUnit.d.ts.map +1 -0
- package/lib/pc/units/frequenceUnit.js +40 -0
- package/lib/pc/units/interfaces/baseTenUnit.d.ts +10 -0
- package/lib/pc/units/interfaces/baseTenUnit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/baseTenUnit.js +16 -0
- package/lib/pc/units/interfaces/basicUnit.d.ts +13 -0
- package/lib/pc/units/interfaces/basicUnit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/basicUnit.js +19 -0
- package/lib/pc/units/interfaces/unit.d.ts +13 -0
- package/lib/pc/units/interfaces/unit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/unit.js +2 -0
- package/lib/pc/units/massUnits.d.ts +17 -0
- package/lib/pc/units/massUnits.d.ts.map +1 -0
- package/lib/pc/units/massUnits.js +32 -0
- package/lib/pc/units/mulitplyUnits.d.ts +13 -0
- package/lib/pc/units/mulitplyUnits.d.ts.map +1 -0
- package/lib/pc/units/mulitplyUnits.js +26 -0
- package/lib/pc/units/powerUnits.d.ts +14 -0
- package/lib/pc/units/powerUnits.d.ts.map +1 -0
- package/lib/pc/units/powerUnits.js +26 -0
- package/lib/pc/units/timeUnits.d.ts +13 -0
- package/lib/pc/units/timeUnits.d.ts.map +1 -0
- package/lib/pc/units/timeUnits.js +42 -0
- package/lib/pc/units/volumeUnit.d.ts +17 -0
- package/lib/pc/units/volumeUnit.d.ts.map +1 -0
- package/lib/pc/units/volumeUnit.js +32 -0
- package/lib/pc/units/wattUnit.d.ts +17 -0
- package/lib/pc/units/wattUnit.d.ts.map +1 -0
- package/lib/pc/units/wattUnit.js +32 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +6 -6
- package/lib/tree/nodes/node.d.ts +3 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +2 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +32 -10
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateIntensityInSerieOrParallel = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const random_1 = require("../../../utils/random");
|
|
8
|
+
const getCalculateIntensityInSerieOrParallelQuestion = () => {
|
|
9
|
+
const exo = generateExercise();
|
|
10
|
+
const schemaIllu = exo.circuit === "Série"
|
|
11
|
+
? " https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/electricCircuit3.png"
|
|
12
|
+
: "https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/electricCircuit2.png";
|
|
13
|
+
const question = {
|
|
14
|
+
answer: exo.answer + "",
|
|
15
|
+
instruction: exo.instruction + ``,
|
|
16
|
+
keys: [],
|
|
17
|
+
answerFormat: "tex",
|
|
18
|
+
identifiers: {
|
|
19
|
+
l1: exo.l1,
|
|
20
|
+
l2: exo.l2,
|
|
21
|
+
isAsking: exo.isAsking,
|
|
22
|
+
circuit: exo.circuit,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
return question;
|
|
26
|
+
};
|
|
27
|
+
const getPropositions = (n, { answer, isAsking, circuit, l1, l2 }) => {
|
|
28
|
+
const propositions = [];
|
|
29
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
30
|
+
generatePropositions(l1, l2, isAsking, circuit).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value + ""));
|
|
31
|
+
while (propositions.length < n) {
|
|
32
|
+
let random = (0, randint_1.randint)(+answer - Math.min(5, +answer - 1), +answer + 6, [+answer]) + "";
|
|
33
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random);
|
|
34
|
+
}
|
|
35
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
36
|
+
};
|
|
37
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
38
|
+
return ans === answer;
|
|
39
|
+
};
|
|
40
|
+
const generateExercise = () => {
|
|
41
|
+
const l1 = (0, randint_1.randint)(10, 60);
|
|
42
|
+
const isAsking = (0, random_1.random)(["L", "L1", "L2"]);
|
|
43
|
+
const circuit = (0, random_1.random)(["Série", "Parallèle", "Parallèle"]);
|
|
44
|
+
const l2 = circuit === "Série" ? l1 : (0, randint_1.randint)(10, 60);
|
|
45
|
+
const l = circuit === "Série" ? l1 : l1 + l2;
|
|
46
|
+
const values = [l, l1, l2];
|
|
47
|
+
const instruction = getInstruction(isAsking, circuit, l1, l2, l);
|
|
48
|
+
const answer = circuit === "Série"
|
|
49
|
+
? l1
|
|
50
|
+
: values[["L", "L1", "L2"].findIndex((value) => value === isAsking)];
|
|
51
|
+
return {
|
|
52
|
+
instruction,
|
|
53
|
+
answer,
|
|
54
|
+
l1,
|
|
55
|
+
l2,
|
|
56
|
+
l,
|
|
57
|
+
isAsking,
|
|
58
|
+
circuit,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
const getInstruction = (isAsking, circuit, l1, l2, l) => {
|
|
62
|
+
if (circuit === "Série")
|
|
63
|
+
return `Pour ce circuit schématisé, l'intensité du courant qui traverse la lampe $L_1$ est de $${l1}$ $mA$, celle traversant la lampe $L_2$ est de $${l2}$ $mA$. \n \\
|
|
64
|
+
Calculer l'intensité du courant qui traverse la pile en $mA$.`;
|
|
65
|
+
switch (isAsking) {
|
|
66
|
+
case "L":
|
|
67
|
+
return `Pour ce circuit schématisé, l'intensité du courant qui traverse la lampe $L_1$ est de $${l1}$ $mA$, celle traversant la lampe $L_2$ est de $${l2}$ $mA$. \n \\
|
|
68
|
+
Calculer l'intensité du courant qui traverse la pile en $mA$.`;
|
|
69
|
+
case "L1":
|
|
70
|
+
return `Pour ce circuit schématisé, l'intensité du courant qui traverse la lampe $L_2$ est de $${l2}$ $mA$, celle traversant la pile est de $${l}$ $mA$. \n \\
|
|
71
|
+
Calculer l'intensité du courant qui traverse la lampe $L_1$ en $mA$.`;
|
|
72
|
+
case "L2":
|
|
73
|
+
return `Pour ce circuit schématisé, l'intensité du courant qui traverse la lampe $L_1$ est de $${l1}$ $mA$, celle traversant la pile est de $${l}$ $mA$. \n \\
|
|
74
|
+
Calculer l'intensité du courant qui traverse la lampe $L_2$ en $mA$.`;
|
|
75
|
+
default:
|
|
76
|
+
return "";
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const generatePropositions = (l1, l2, isAsking, circuit) => {
|
|
80
|
+
if (circuit === "Série")
|
|
81
|
+
return [l1 + l2, Math.floor(l1 / 2)];
|
|
82
|
+
switch (isAsking) {
|
|
83
|
+
case "L":
|
|
84
|
+
return [l1, l2, Math.abs(l1 - l2)];
|
|
85
|
+
case "L1":
|
|
86
|
+
return [l2, l1 + l2, l1 + l2 + l2];
|
|
87
|
+
case "L2":
|
|
88
|
+
return [l1, l1 + l2, l2 + l1 + l1];
|
|
89
|
+
default:
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
exports.calculateIntensityInSerieOrParallel = {
|
|
94
|
+
id: "calculateIntensityInSerieOrParallel",
|
|
95
|
+
label: "Calcul d'intnsité dans un circuit électrique en série/parallèle",
|
|
96
|
+
levels: ["1reSpé"],
|
|
97
|
+
isSingleStep: true,
|
|
98
|
+
sections: ["Électricité"],
|
|
99
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalculateIntensityInSerieOrParallelQuestion, nb),
|
|
100
|
+
qcmTimer: 60,
|
|
101
|
+
freeTimer: 60,
|
|
102
|
+
getPropositions,
|
|
103
|
+
isAnswerValid,
|
|
104
|
+
subject: "Physique",
|
|
105
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
E: number;
|
|
4
|
+
I: number;
|
|
5
|
+
r: number;
|
|
6
|
+
R: number;
|
|
7
|
+
isAsking: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const calculateVoltage: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=calculateVoltage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateVoltage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/calculateVoltage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAiKF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculateVoltage = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
const getCalculateVoltageQuestion = () => {
|
|
10
|
+
const exo = generateExercise();
|
|
11
|
+
const question = {
|
|
12
|
+
answer: exo.answer,
|
|
13
|
+
instruction: exo.instruction,
|
|
14
|
+
keys: [],
|
|
15
|
+
correction: exo.correction,
|
|
16
|
+
hint: exo.hint,
|
|
17
|
+
answerFormat: "tex",
|
|
18
|
+
identifiers: {
|
|
19
|
+
E: exo.E,
|
|
20
|
+
I: exo.I,
|
|
21
|
+
r: exo.r,
|
|
22
|
+
R: exo.R,
|
|
23
|
+
isAsking: exo.isAsking,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
};
|
|
28
|
+
const getPropositions = (n, { answer, E, I, R, r, isAsking }) => {
|
|
29
|
+
const propositions = [];
|
|
30
|
+
const correctAns = +getCorrectAnswer(isAsking, E, I, r, R).toFixed(0);
|
|
31
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
32
|
+
generatePropositions(E, I, r, R, isAsking).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
|
|
33
|
+
while (propositions.length < n) {
|
|
34
|
+
let random = (0, randint_1.randint)(correctAns - 10, correctAns + 11, [correctAns]);
|
|
35
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random.frenchify());
|
|
36
|
+
}
|
|
37
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
38
|
+
};
|
|
39
|
+
const isAnswerValid = (ans, { answer, isAsking, E, I, r, R }) => {
|
|
40
|
+
const scientificAns = getCorrectAnswer(isAsking, E, I, r, R).toScientific(0);
|
|
41
|
+
return [answer, scientificAns].includes(ans);
|
|
42
|
+
};
|
|
43
|
+
const generatePropositions = (E, I, r, R, isAsking) => {
|
|
44
|
+
const first = E.frenchify();
|
|
45
|
+
let second = (0).frenchify();
|
|
46
|
+
switch (isAsking) {
|
|
47
|
+
case "du générateur":
|
|
48
|
+
second = (+getCorrectAnswer("de la résistance", E, I, r, R).toFixed(0)).frenchify();
|
|
49
|
+
break;
|
|
50
|
+
case "de la résistance":
|
|
51
|
+
second = (+getCorrectAnswer("du générateur", E, I, r, R).toFixed(0)).frenchify();
|
|
52
|
+
break;
|
|
53
|
+
case "de la diode":
|
|
54
|
+
second = (+(getCorrectAnswer("de la résistance", E, I, r, R) +
|
|
55
|
+
getCorrectAnswer("du générateur", E, I, r, R)).toFixed(0)).frenchify();
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
return [first, second];
|
|
59
|
+
};
|
|
60
|
+
const generateExercise = () => {
|
|
61
|
+
const R = (0, randint_1.randint)(1, 21);
|
|
62
|
+
const I = (0, randfloat_1.randfloat)(0.1, 4, 1);
|
|
63
|
+
const r = (0, randint_1.randint)(1, 6);
|
|
64
|
+
const EMin = Math.floor(r * I + R * I);
|
|
65
|
+
const E = (0, randint_1.randint)(EMin + 5, EMin + 51);
|
|
66
|
+
const isAsking = (0, random_1.random)(["du générateur", "de la résistance", "de la diode"]);
|
|
67
|
+
const instruction = `Dans un circuit électrique, on trouve :
|
|
68
|
+
|
|
69
|
+
- Une source de tension $E=${E}$ volts, avec une résistance interne $r=${r}\\ \\Omega$.
|
|
70
|
+
|
|
71
|
+
- Un conducteur ohmique de résistance $R=${R}\\ \\Omega$.
|
|
72
|
+
|
|
73
|
+
- Un courant $I=${I.frenchify()}\\ A$ circule à travers la résistance.
|
|
74
|
+
|
|
75
|
+
Calculez la tension U aux bornes ${isAsking} en $V$, arrondie à l'unité
|
|
76
|
+
`;
|
|
77
|
+
const answer = getCorrectAnswer(isAsking, E, I, r, R).toFixed(0);
|
|
78
|
+
const correction = getCorrection(isAsking, answer);
|
|
79
|
+
const hint = getHint(isAsking);
|
|
80
|
+
return {
|
|
81
|
+
instruction,
|
|
82
|
+
answer: answer,
|
|
83
|
+
correction,
|
|
84
|
+
hint,
|
|
85
|
+
isAsking,
|
|
86
|
+
E,
|
|
87
|
+
I,
|
|
88
|
+
r,
|
|
89
|
+
R,
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
const getCorrectAnswer = (isAsking, E, I, r, R) => {
|
|
93
|
+
switch (isAsking) {
|
|
94
|
+
case "du générateur":
|
|
95
|
+
return E - r * I;
|
|
96
|
+
case "de la résistance":
|
|
97
|
+
return R * I;
|
|
98
|
+
case "de la diode":
|
|
99
|
+
const U1 = E - r * I;
|
|
100
|
+
const U2 = R * I;
|
|
101
|
+
return U1 - U2;
|
|
102
|
+
default:
|
|
103
|
+
return 0;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const getHint = (isAsking) => {
|
|
107
|
+
switch (isAsking) {
|
|
108
|
+
case "de la diode":
|
|
109
|
+
return `Calculer d'abord la tension aux bornes du conducteur ohmique et du générateur, puis appliquer la loi des mailles.`;
|
|
110
|
+
case "du générateur":
|
|
111
|
+
return `Appliquer la formule qui met en relation la tension $U$ aux bornes du générateur, la résistance interne du générateur $r$ et l'intensité $I$.`;
|
|
112
|
+
case "de la résistance":
|
|
113
|
+
return `Appliquer la loi d'ohm.`;
|
|
114
|
+
default:
|
|
115
|
+
return "";
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const getCorrection = (isAsking, answer) => {
|
|
119
|
+
switch (isAsking) {
|
|
120
|
+
case "du générateur":
|
|
121
|
+
return `Appliquer la formule qui met en relation la tension $U$ aux bornes du générateur, la résistance interne du générateur $r$ et l'intensité $I$.\n
|
|
122
|
+
$U=E-r \\cdot I\\ \\Rightarrow\\ U=${answer}\\ V$`;
|
|
123
|
+
case "de la résistance":
|
|
124
|
+
return `Appliquer la loi d'ohm : $U=R \\cdot I\\ \\Rightarrow\\ U=${answer}\\ V$`;
|
|
125
|
+
case "de la diode":
|
|
126
|
+
return `1 - Calculer la tension aux bornes du générateur $U=E-r \\cdot I$.\n
|
|
127
|
+
2 - Calculer la tension aux bornes du conducteur ohmique $U_1=R \\cdot I$.\n
|
|
128
|
+
3 - Appliquer la loi des mailles $U=U_1+U_2\\ \\Rightarrow\\ U_2=U-U_1\\ \\Rightarrow\\ U_2=${answer}\\ V$`;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
exports.calculateVoltage = {
|
|
132
|
+
id: "calculateVoltage",
|
|
133
|
+
label: "Calcul de tension au borne d'une résistance",
|
|
134
|
+
levels: ["2nde"],
|
|
135
|
+
isSingleStep: true,
|
|
136
|
+
sections: ["Électricité"],
|
|
137
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalculateVoltageQuestion, nb),
|
|
138
|
+
qcmTimer: 60,
|
|
139
|
+
freeTimer: 60,
|
|
140
|
+
getPropositions,
|
|
141
|
+
isAnswerValid,
|
|
142
|
+
subject: "Physique",
|
|
143
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
power: number;
|
|
4
|
+
seconds: number;
|
|
5
|
+
energy: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const electricPowerOrEnergyCalculation: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=electricPowerOrEnergyCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electricPowerOrEnergyCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/electricPowerOrEnergyCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAwFtE,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAalE,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.electricPowerOrEnergyCalculation = void 0;
|
|
4
|
+
const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
5
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
7
|
+
const round_1 = require("../../../math/utils/round");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
10
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
11
|
+
const powers = [15, 18, 50, 25, 65, 66, 7.5, 10]; // Puissances en watts
|
|
12
|
+
const durations = [60, 3600, 86400, 604800]; // Durées en secondes (1 min, 1 h, 1 jour, 1 semaine)
|
|
13
|
+
const getElectricPowerOrEnergyQuestion = () => {
|
|
14
|
+
const power = (0, random_1.random)(powers);
|
|
15
|
+
const seconds = (0, random_1.random)(durations);
|
|
16
|
+
const energy = power * seconds;
|
|
17
|
+
const isCalculatingEnergy = (0, coinFlip_1.coinFlip)();
|
|
18
|
+
const questionText = isCalculatingEnergy
|
|
19
|
+
? `Un appareil a une puissance de $P = ${(0, frenchify_1.frenchify)(power)}\\ \\text{W}$ et fonctionne pendant $t = ${(0, frenchify_1.frenchify)(seconds)}\\ \\text{s}$. Calculez l'énergie électrique $E$ en $\\text{J}$ fournie par cet appareil.`
|
|
20
|
+
: `Un appareil consomme une énergie $E = ${(0, frenchify_1.frenchify)(energy)}\\ \\text{J}$ en $t = ${(0, frenchify_1.frenchify)(seconds)}\\ \\text{s}$. Calculez la puissance $P$ en $\\text{W}$ de cet appareil.`;
|
|
21
|
+
const answer = isCalculatingEnergy ? energy : (0, round_1.round)(energy / seconds, 2);
|
|
22
|
+
const hint = `La relation entre l'énergie électrique, la puissance et le temps est donnée par la formule :
|
|
23
|
+
$$
|
|
24
|
+
E = P \\times t
|
|
25
|
+
$$
|
|
26
|
+
Réarrangez cette formule pour isoler la variable à trouver.`;
|
|
27
|
+
const correction = `La relation entre l'énergie électrique, la puissance et le temps est :
|
|
28
|
+
$$
|
|
29
|
+
E = P \\times t
|
|
30
|
+
$$
|
|
31
|
+
|
|
32
|
+
Pour résoudre ce problème, nous devons réorganiser la formule pour isoler la variable inconnue.
|
|
33
|
+
|
|
34
|
+
${isCalculatingEnergy
|
|
35
|
+
? `$$E = P \\times t = ${(0, frenchify_1.frenchify)(power)} \\times ${(0, frenchify_1.frenchify)(seconds)} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{J}$$`
|
|
36
|
+
: `$$P = \\frac{E}{t} = \\frac{${(0, frenchify_1.frenchify)(energy)}}{${(0, frenchify_1.frenchify)(seconds)}} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{W}$$`}`;
|
|
37
|
+
const question = {
|
|
38
|
+
answer: answer.toTree().toTex(),
|
|
39
|
+
instruction: questionText,
|
|
40
|
+
hint,
|
|
41
|
+
correction,
|
|
42
|
+
keys: ["P", "E", "t"],
|
|
43
|
+
answerFormat: "tex",
|
|
44
|
+
identifiers: { power, seconds, energy },
|
|
45
|
+
};
|
|
46
|
+
return question;
|
|
47
|
+
};
|
|
48
|
+
const getPropositions = (n, { answer, power, seconds, energy }) => {
|
|
49
|
+
const propositions = [];
|
|
50
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
51
|
+
const wrongAnswers = [
|
|
52
|
+
(0, round_1.roundSignificant)(power * seconds * 0.5, 2),
|
|
53
|
+
(0, round_1.roundSignificant)(energy * 0.1, 2),
|
|
54
|
+
(0, round_1.roundSignificant)(seconds / power, 2),
|
|
55
|
+
(0, round_1.roundSignificant)(power / seconds, 2),
|
|
56
|
+
];
|
|
57
|
+
wrongAnswers.forEach((wrongAnswer) => {
|
|
58
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
|
|
59
|
+
});
|
|
60
|
+
while (propositions.length < n) {
|
|
61
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(0.1, 5, 2).toTree().toTex());
|
|
62
|
+
}
|
|
63
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
64
|
+
};
|
|
65
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
66
|
+
return ans === answer;
|
|
67
|
+
};
|
|
68
|
+
exports.electricPowerOrEnergyCalculation = {
|
|
69
|
+
id: "electricPowerOrEnergyCalculation",
|
|
70
|
+
label: "Calculer la puissance ou l'énergie électrique",
|
|
71
|
+
levels: ["1reSpé"],
|
|
72
|
+
isSingleStep: true,
|
|
73
|
+
sections: ["Électricité"],
|
|
74
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getElectricPowerOrEnergyQuestion, nb),
|
|
75
|
+
qcmTimer: 60,
|
|
76
|
+
freeTimer: 60,
|
|
77
|
+
getPropositions,
|
|
78
|
+
isAnswerValid,
|
|
79
|
+
subject: "Physique",
|
|
80
|
+
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export * from "./electricChargeFromIntensity";
|
|
2
2
|
export * from "./electricEnergyFromPower";
|
|
3
|
+
export * from "./calculateVoltage";
|
|
4
|
+
export * from "./ohmicConductorOrGenerator";
|
|
5
|
+
export * from "./kirchhoffVoltageLaw";
|
|
6
|
+
export * from "./calculateIntensityInSerieOrParallel";
|
|
7
|
+
export * from "./calculateIntensity";
|
|
8
|
+
export * from "./ohmLaw";
|
|
9
|
+
export * from "./electricPowerOrEnergyCalculation";
|
|
3
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,oCAAoC,CAAC"}
|
|
@@ -16,3 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./electricChargeFromIntensity"), exports);
|
|
18
18
|
__exportStar(require("./electricEnergyFromPower"), exports);
|
|
19
|
+
__exportStar(require("./calculateVoltage"), exports);
|
|
20
|
+
__exportStar(require("./ohmicConductorOrGenerator"), exports);
|
|
21
|
+
__exportStar(require("./kirchhoffVoltageLaw"), exports);
|
|
22
|
+
__exportStar(require("./calculateIntensityInSerieOrParallel"), exports);
|
|
23
|
+
__exportStar(require("./calculateIntensity"), exports);
|
|
24
|
+
__exportStar(require("./ohmLaw"), exports);
|
|
25
|
+
__exportStar(require("./electricPowerOrEnergyCalculation"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
isAsking: string;
|
|
4
|
+
uAB: number;
|
|
5
|
+
uED: number;
|
|
6
|
+
uDC: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const kirchhoffVoltageLaw: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=kirchhoffVoltageLaw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kirchhoffVoltageLaw.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/kirchhoffVoltageLaw.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAoHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.kirchhoffVoltageLaw = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const random_1 = require("../../../utils/random");
|
|
8
|
+
const getKirchhoffVoltageLawQuestion = () => {
|
|
9
|
+
const exo = generateExercise();
|
|
10
|
+
const question = {
|
|
11
|
+
answer: exo.answer + "",
|
|
12
|
+
instruction: exo.instruction +
|
|
13
|
+
``,
|
|
14
|
+
keys: [],
|
|
15
|
+
answerFormat: "tex",
|
|
16
|
+
identifiers: {
|
|
17
|
+
isAsking: exo.isAsking,
|
|
18
|
+
uAB: exo.uAB,
|
|
19
|
+
uED: exo.uED,
|
|
20
|
+
uDC: exo.uDC,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
return question;
|
|
24
|
+
};
|
|
25
|
+
const getPropositions = (n, { answer, isAsking, uAB, uDC, uED }) => {
|
|
26
|
+
const propositions = [];
|
|
27
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
28
|
+
generateProposition(isAsking, uAB, uED, uDC).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value + ""));
|
|
29
|
+
while (propositions.length < n) {
|
|
30
|
+
let random = (0, randint_1.randint)(+answer - Math.min(5, +answer), +answer + 6, [
|
|
31
|
+
+answer,
|
|
32
|
+
]);
|
|
33
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random + "");
|
|
34
|
+
}
|
|
35
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
36
|
+
};
|
|
37
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
38
|
+
return ans === answer;
|
|
39
|
+
};
|
|
40
|
+
const generateProposition = (isAsking, uAB, uED, uDC) => {
|
|
41
|
+
switch (isAsking) {
|
|
42
|
+
case "UAB":
|
|
43
|
+
return [uDC + uED, Math.abs(uDC - uED)];
|
|
44
|
+
case "UED":
|
|
45
|
+
return [uAB + uDC, uAB, uDC];
|
|
46
|
+
case "UDC":
|
|
47
|
+
return [uAB + uED, uAB, uED];
|
|
48
|
+
}
|
|
49
|
+
return [uAB - uED, uAB - uDC, uED + uDC];
|
|
50
|
+
};
|
|
51
|
+
const generateExercise = () => {
|
|
52
|
+
const uED = (0, randint_1.randint)(1, 60);
|
|
53
|
+
const uDC = (0, randint_1.randint)(1, 60);
|
|
54
|
+
const uAB = uED + uDC;
|
|
55
|
+
const isAsking = (0, random_1.random)(["UAB", "UDC", "UED"]);
|
|
56
|
+
const instruction = getInstruction(isAsking, uAB, uDC, uED);
|
|
57
|
+
const answer = getAnswer(isAsking, uAB, uDC, uED);
|
|
58
|
+
return {
|
|
59
|
+
instruction,
|
|
60
|
+
answer,
|
|
61
|
+
isAsking,
|
|
62
|
+
uAB,
|
|
63
|
+
uED,
|
|
64
|
+
uDC,
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const getInstruction = (isAsking, uAB, uDC, uED) => {
|
|
68
|
+
switch (isAsking) {
|
|
69
|
+
case "UAB":
|
|
70
|
+
return `Un circuit est alimenté par une pile. \n \\
|
|
71
|
+
La tension $U_{DC}$ aux bornes de la diode est $${uDC}$ $V$. \n \\
|
|
72
|
+
La tension $U_{ED}$ aux bornes du conducteur ohmique est $${uED}$ $V$. \n \\
|
|
73
|
+
Cacluler la tension de la pile $U_{AB}$.`;
|
|
74
|
+
case "UED":
|
|
75
|
+
return `Un circuit est alimenté par une pile de $${uAB}$ $V$. \n \\
|
|
76
|
+
La tension $U_{DC}$ aux bornes de la diode est $${uDC}$ $V$. \n \\
|
|
77
|
+
Calculer la tension $U_{ED}$ aux bornes du conducteur ohmique.`;
|
|
78
|
+
case "UDC":
|
|
79
|
+
return `Un circuit est alimenté par une pile de $${uAB}$ $V$. \n \\
|
|
80
|
+
La tension $U_{ED}$ aux bornes du conducteur ohmique est $${uED}$ $V$. \n \\
|
|
81
|
+
Calculer la tension $U_{DC}$ aux bornes de la diode.`;
|
|
82
|
+
default:
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const getAnswer = (isAsking, uAB, uDC, uED) => {
|
|
87
|
+
switch (isAsking) {
|
|
88
|
+
case "UAB":
|
|
89
|
+
return uDC + uED;
|
|
90
|
+
case "UED":
|
|
91
|
+
return uAB - uDC;
|
|
92
|
+
case "UDC":
|
|
93
|
+
return uAB - uED;
|
|
94
|
+
default:
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
exports.kirchhoffVoltageLaw = {
|
|
99
|
+
id: "kirchhoffVoltageLaw",
|
|
100
|
+
label: "Application de la loi de maille",
|
|
101
|
+
levels: ["2nde"],
|
|
102
|
+
isSingleStep: true,
|
|
103
|
+
sections: ["Électricité"],
|
|
104
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getKirchhoffVoltageLawQuestion, nb),
|
|
105
|
+
qcmTimer: 60,
|
|
106
|
+
freeTimer: 60,
|
|
107
|
+
getPropositions,
|
|
108
|
+
isAnswerValid,
|
|
109
|
+
subject: "Physique",
|
|
110
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
voltage: number;
|
|
4
|
+
current: number;
|
|
5
|
+
resistance: number;
|
|
6
|
+
target: string;
|
|
7
|
+
targetValue: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const OhmLawExercise: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ohmLaw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ohmLaw.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmLaw.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsJF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAYhD,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OhmLawExercise = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const round_1 = require("../../../math/utils/round");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const getOhmLawQuestion = () => {
|
|
10
|
+
const resistance = (0, randint_1.randint)(1, 50);
|
|
11
|
+
const current = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 4, 2), 2);
|
|
12
|
+
const voltage = (0, round_1.round)(resistance * current, 2);
|
|
13
|
+
const variables = [
|
|
14
|
+
{ name: "résistance", value: resistance, unit: " \\ \\Omega", symbol: "R" },
|
|
15
|
+
{ name: "courant", value: current, unit: "\\ A", symbol: "I" },
|
|
16
|
+
{ name: "tension", value: voltage, unit: "\\ V", symbol: "U" },
|
|
17
|
+
];
|
|
18
|
+
const randomIndex = (0, randint_1.randint)(0, variables.length);
|
|
19
|
+
const targetVariable = variables[randomIndex];
|
|
20
|
+
const knownVariables = variables.filter((_, index) => index !== randomIndex);
|
|
21
|
+
const instruction = `Lors d'une expérience en classe de physique, vous devez étudier le comportement d'un conducteur ohmique. Vous avez connecté le conducteur à un circuit électrique et mesuré les valeurs suivantes :
|
|
22
|
+
- ${knownVariables[0].name.charAt(0).toUpperCase() +
|
|
23
|
+
knownVariables[0].name.slice(1)} : $${knownVariables[0].symbol} = ${(0, round_1.round)(knownVariables[0].value, 2)
|
|
24
|
+
.toTree()
|
|
25
|
+
.toTex()} ${knownVariables[0].unit}$
|
|
26
|
+
- ${knownVariables[1].name.charAt(0).toUpperCase() +
|
|
27
|
+
knownVariables[1].name.slice(1)} : $${knownVariables[1].symbol} = ${(0, round_1.round)(knownVariables[1].value, 2)
|
|
28
|
+
.toTree()
|
|
29
|
+
.toTex()} ${knownVariables[1].unit}$. \n
|
|
30
|
+
Déterminez ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
31
|
+
? "la"
|
|
32
|
+
: "le"} ${targetVariable.name} ${targetVariable.name === "tension"
|
|
33
|
+
? "aux bords du"
|
|
34
|
+
: targetVariable.name === "courant"
|
|
35
|
+
? "qui traverse le"
|
|
36
|
+
: "du"} conducteur.`;
|
|
37
|
+
const hint = `Rappelez-vous la loi d'Ohm : $U = R \\cdot I$.`;
|
|
38
|
+
const correction = `La loi d'Ohm est donnée par :
|
|
39
|
+
$U = R \\cdot I$. En utilisant les valeurs fournies pour ${knownVariables[0].name} et ${knownVariables[1].name}, vous pouvez résoudre pour ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
40
|
+
? "la"
|
|
41
|
+
: "le"} ${targetVariable.name} :
|
|
42
|
+
$${targetVariable.symbol} = ${(0, round_1.round)(knownVariables[0].value, 2)
|
|
43
|
+
.toTree()
|
|
44
|
+
.toTex()} \\times ${(0, round_1.round)(knownVariables[1].value, 2)
|
|
45
|
+
.toTree()
|
|
46
|
+
.toTex()} = ${(0, round_1.round)(targetVariable.value, 2).toTree().toTex()}\\ ${targetVariable.unit}$. \n
|
|
47
|
+
Donc, ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
48
|
+
? "la"
|
|
49
|
+
: "le"} ${targetVariable.name} est $${(0, round_1.round)(targetVariable.value, 2)
|
|
50
|
+
.toTree()
|
|
51
|
+
.toTex()}\\ ${targetVariable.unit}$.`;
|
|
52
|
+
const question = {
|
|
53
|
+
answer: (0, round_1.round)(targetVariable.value, 2).toTree().toTex(),
|
|
54
|
+
instruction,
|
|
55
|
+
hint,
|
|
56
|
+
correction,
|
|
57
|
+
keys: [],
|
|
58
|
+
answerFormat: "tex",
|
|
59
|
+
identifiers: {
|
|
60
|
+
voltage,
|
|
61
|
+
current,
|
|
62
|
+
resistance,
|
|
63
|
+
target: targetVariable.name,
|
|
64
|
+
targetValue: targetVariable.value,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
return question;
|
|
68
|
+
};
|
|
69
|
+
const getPropositions = (n, { answer, voltage, current, resistance, target }) => {
|
|
70
|
+
const propositions = [];
|
|
71
|
+
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
72
|
+
if (target === "tension") {
|
|
73
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(voltage * (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
74
|
+
.toTree()
|
|
75
|
+
.toTex());
|
|
76
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(voltage / (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
77
|
+
.toTree()
|
|
78
|
+
.toTex());
|
|
79
|
+
}
|
|
80
|
+
else if (target === "courant") {
|
|
81
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(current * (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
82
|
+
.toTree()
|
|
83
|
+
.toTex());
|
|
84
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(current / (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
85
|
+
.toTree()
|
|
86
|
+
.toTex());
|
|
87
|
+
}
|
|
88
|
+
else if (target === "résistance") {
|
|
89
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(resistance * (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
90
|
+
.toTree()
|
|
91
|
+
.toTex());
|
|
92
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(resistance / (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
93
|
+
.toTree()
|
|
94
|
+
.toTex());
|
|
95
|
+
}
|
|
96
|
+
while (propositions.length < n) {
|
|
97
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(10, 100, 2).toTree().toTex());
|
|
98
|
+
}
|
|
99
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
100
|
+
};
|
|
101
|
+
const isAnswerValid = (ans, { answer, targetValue }) => {
|
|
102
|
+
const validAnswer1 = (0, round_1.round)(targetValue, 2).toTree().toTex();
|
|
103
|
+
const validAnswer2 = targetValue.toScientific(2).toTex();
|
|
104
|
+
const validAnswer3 = targetValue.toScientific(1).toTex();
|
|
105
|
+
const validAnswer4 = targetValue.toScientific(3).toTex();
|
|
106
|
+
let latexs = [];
|
|
107
|
+
latexs.push(validAnswer1, validAnswer2, validAnswer3, validAnswer4);
|
|
108
|
+
return latexs.includes(ans);
|
|
109
|
+
};
|
|
110
|
+
exports.OhmLawExercise = {
|
|
111
|
+
id: "ohmLaw",
|
|
112
|
+
label: "Utiliser la loi d'Ohm pour calculer tension, courant ou résistance",
|
|
113
|
+
levels: ["2nde"],
|
|
114
|
+
isSingleStep: true,
|
|
115
|
+
sections: ["Électricité"],
|
|
116
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getOhmLawQuestion, nb),
|
|
117
|
+
qcmTimer: 60,
|
|
118
|
+
freeTimer: 60,
|
|
119
|
+
getPropositions,
|
|
120
|
+
isAnswerValid,
|
|
121
|
+
subject: "Physique",
|
|
122
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA6FtB,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|