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,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeOfAcceleration = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
const getTypeOfAccelerationQuestion = () => {
|
|
10
|
+
const exo = generateExo();
|
|
11
|
+
const question = {
|
|
12
|
+
answer: exo.answer,
|
|
13
|
+
instruction: exo.instruction,
|
|
14
|
+
commands: exo.ggb.object.commands,
|
|
15
|
+
options: exo.ggb.object.getOptions(),
|
|
16
|
+
coords: exo.ggb.coords,
|
|
17
|
+
keys: [],
|
|
18
|
+
answerFormat: "raw",
|
|
19
|
+
identifiers: {},
|
|
20
|
+
};
|
|
21
|
+
return question;
|
|
22
|
+
};
|
|
23
|
+
const getPropositions = (n, { answer }) => {
|
|
24
|
+
const propositions = [];
|
|
25
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
26
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Mouvement accéléré", "raw");
|
|
27
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Mouvement ralenti", "raw");
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Mouvement constant", "raw");
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
30
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
31
|
+
};
|
|
32
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
33
|
+
return ans === answer;
|
|
34
|
+
};
|
|
35
|
+
const generateExo = () => {
|
|
36
|
+
const typeOfAcceleration = (0, random_1.random)([
|
|
37
|
+
"Mouvement accéléré",
|
|
38
|
+
"Mouvement ralenti",
|
|
39
|
+
"Mouvement constant",
|
|
40
|
+
]);
|
|
41
|
+
const ggb = generateGgb(typeOfAcceleration);
|
|
42
|
+
const instruction = `D'après le graphique ci-dessous qui représente la position d'un objet en fonction du temps,
|
|
43
|
+
|
|
44
|
+
déterminez si l'objet est en mouvement accéléré, en mouvement ralenti ou en mouvement constant.`;
|
|
45
|
+
return {
|
|
46
|
+
instruction,
|
|
47
|
+
answer: typeOfAcceleration,
|
|
48
|
+
ggb,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
const generateGgb = (typeOfAcceleration) => {
|
|
52
|
+
const points = getPoints(typeOfAcceleration);
|
|
53
|
+
return {
|
|
54
|
+
object: new geogebraConstructor_1.GeogebraConstructor(points.points, {
|
|
55
|
+
hideAxes: true,
|
|
56
|
+
hideGrid: true,
|
|
57
|
+
}),
|
|
58
|
+
coords: points.coords,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
const getPoints = (typeOfAcceleration) => {
|
|
62
|
+
const points = [];
|
|
63
|
+
let coords = [];
|
|
64
|
+
let n = 0;
|
|
65
|
+
let x = 0;
|
|
66
|
+
let step = (0, randint_1.randint)(3, 14);
|
|
67
|
+
let variation = 1;
|
|
68
|
+
if (typeOfAcceleration === "Mouvement accéléré")
|
|
69
|
+
variation = 1.3;
|
|
70
|
+
if (typeOfAcceleration === "Mouvement ralenti") {
|
|
71
|
+
step = (0, randint_1.randint)(10, 21);
|
|
72
|
+
variation = 0.8;
|
|
73
|
+
}
|
|
74
|
+
while (n < 10) {
|
|
75
|
+
points.push(`Point({${x},4})`);
|
|
76
|
+
x = x + step;
|
|
77
|
+
step = step * variation;
|
|
78
|
+
n++;
|
|
79
|
+
}
|
|
80
|
+
coords = [-2, x + 5, -2, 20];
|
|
81
|
+
return { points, coords };
|
|
82
|
+
};
|
|
83
|
+
exports.typeOfAcceleration = {
|
|
84
|
+
id: "typeOfAcceleration",
|
|
85
|
+
label: "Déterminer le type d'accélération du mouvement d'un objet.",
|
|
86
|
+
levels: ["2nde"],
|
|
87
|
+
isSingleStep: true,
|
|
88
|
+
sections: ["Mécanique"],
|
|
89
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTypeOfAccelerationQuestion, nb),
|
|
90
|
+
qcmTimer: 60,
|
|
91
|
+
freeTimer: 60,
|
|
92
|
+
getPropositions,
|
|
93
|
+
isAnswerValid,
|
|
94
|
+
hasGeogebra: true,
|
|
95
|
+
answerType: "QCM",
|
|
96
|
+
subject: "Physique",
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeOfMovement.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkHtB,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeOfMovement = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
+
const affine_1 = require("../../../math/polynomials/affine");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const random_1 = require("../../../utils/random");
|
|
10
|
+
const getTypeOfMovementQuestion = () => {
|
|
11
|
+
const exo = generateExercise();
|
|
12
|
+
const ggb = exo.ggb;
|
|
13
|
+
const question = {
|
|
14
|
+
answer: exo.answer,
|
|
15
|
+
instruction: exo.instruction,
|
|
16
|
+
commands: ggb.commands,
|
|
17
|
+
coords: exo.coords,
|
|
18
|
+
options: ggb.getOptions(),
|
|
19
|
+
keys: [],
|
|
20
|
+
answerFormat: "raw",
|
|
21
|
+
identifiers: {},
|
|
22
|
+
};
|
|
23
|
+
return question;
|
|
24
|
+
};
|
|
25
|
+
const getPropositions = (n, { answer }) => {
|
|
26
|
+
const propositions = [];
|
|
27
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Rectiligne", "raw");
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Circulaire", "raw");
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Curviligne", "raw");
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir.", "raw");
|
|
32
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
33
|
+
};
|
|
34
|
+
const generateExercise = () => {
|
|
35
|
+
const movementType = (0, random_1.random)(["Rectiligne", "Circulaire", "Curviligne"]);
|
|
36
|
+
const ggb = getGgb(movementType);
|
|
37
|
+
const instruction = `Soit le graphique ci-dessous, représentant la position d'un objet en fonction du temps. \n \\
|
|
38
|
+
Déterminer le type de mouvement de l'objet.`;
|
|
39
|
+
return {
|
|
40
|
+
instruction,
|
|
41
|
+
answer: movementType,
|
|
42
|
+
movementType,
|
|
43
|
+
ggb: ggb.ggb,
|
|
44
|
+
coords: ggb.coords,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const getGgb = (movementType) => {
|
|
48
|
+
let commands = [];
|
|
49
|
+
let coords = [];
|
|
50
|
+
let point1;
|
|
51
|
+
let point2;
|
|
52
|
+
switch (movementType) {
|
|
53
|
+
case "Circulaire":
|
|
54
|
+
const a = (0, randint_1.randint)(1, 5);
|
|
55
|
+
const b = (0, randint_1.randint)(6, 9);
|
|
56
|
+
commands = [
|
|
57
|
+
`Semicircle((${a},4),(${b},8))`,
|
|
58
|
+
`Point({${a},4})`,
|
|
59
|
+
`Point({${b},8})`,
|
|
60
|
+
`Point({${a},8})`,
|
|
61
|
+
];
|
|
62
|
+
coords = [-2, 10, -2, 10];
|
|
63
|
+
break;
|
|
64
|
+
case "Rectiligne":
|
|
65
|
+
const affine = affine_1.AffineConstructor.random({ min: 1, max: 4 }, { min: 1, max: 4 });
|
|
66
|
+
point1 = `(2,${affine.calculate(2)})`;
|
|
67
|
+
point2 = `(8,${affine.calculate(8)})`;
|
|
68
|
+
commands = [`Segment(${point1},${point2})`].concat(getPoints(movementType, { affine }));
|
|
69
|
+
coords = [-2, 10, -2, affine.calculate(8) + 5];
|
|
70
|
+
break;
|
|
71
|
+
case "Curviligne":
|
|
72
|
+
const random = (0, randint_1.randint)(10, 21);
|
|
73
|
+
const bRand = (0, randint_1.randint)(1, 5);
|
|
74
|
+
commands = [`Function(e^sin(x)+${bRand},0,${random})`].concat(getPoints(movementType, { bRand: bRand }));
|
|
75
|
+
coords = [-2, 10, -2, 10];
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
ggb: new geogebraConstructor_1.GeogebraConstructor(commands, {}),
|
|
80
|
+
coords,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const getPoints = (movementType, options) => {
|
|
84
|
+
const commands = [];
|
|
85
|
+
switch (movementType) {
|
|
86
|
+
case "Rectiligne":
|
|
87
|
+
for (let x = 3; x < 8; x++) {
|
|
88
|
+
commands.push(`Point({${x},${options.affine.calculate(x)}})`);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "Curviligne":
|
|
92
|
+
for (let x = 1; x < 9; x++) {
|
|
93
|
+
commands.push(`Point({${x},${Math.exp(Math.sin(x)) + options.bRand}})`);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
return commands;
|
|
98
|
+
};
|
|
99
|
+
exports.typeOfMovement = {
|
|
100
|
+
id: "typeOfMovement",
|
|
101
|
+
label: "Déterminer le type de mouvement",
|
|
102
|
+
levels: ["2nde"],
|
|
103
|
+
isSingleStep: true,
|
|
104
|
+
sections: ["Mécanique"],
|
|
105
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTypeOfMovementQuestion, nb),
|
|
106
|
+
qcmTimer: 60,
|
|
107
|
+
freeTimer: 60,
|
|
108
|
+
getPropositions,
|
|
109
|
+
answerType: "QCM",
|
|
110
|
+
subject: "Physique",
|
|
111
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/orderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA4DF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.orderOfMagnitude = 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 distanceUnits_1 = require("../../pc/units/distanceUnits");
|
|
9
|
+
const measure_1 = require("../../pc/measure/measure");
|
|
10
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
11
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
+
const ten = new numberNode_1.NumberNode(10);
|
|
13
|
+
const getOrderOfMagnitudeQuestion = () => {
|
|
14
|
+
const exercise = generateExercise();
|
|
15
|
+
const question = {
|
|
16
|
+
answer: `${exercise.answer.toTex()}`,
|
|
17
|
+
instruction: exercise.instruction,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { order: exercise.order, multiplier: exercise.multiplier },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, order, multiplier }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
generatePropositions(order, multiplier).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
|
|
28
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
29
|
+
};
|
|
30
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
31
|
+
return ans === answer;
|
|
32
|
+
};
|
|
33
|
+
const generatePropositions = (order, multiplier) => {
|
|
34
|
+
const correctAnswer = multiplier > 5 ? order + 1 : order;
|
|
35
|
+
const first = new powerNode_1.PowerNode(ten, (correctAnswer - 1).toTree()).toTex() + "m";
|
|
36
|
+
const second = new measure_1.Measure(multiplier, correctAnswer, distanceUnits_1.DistanceUnit.m).toTex();
|
|
37
|
+
const third = new powerNode_1.PowerNode(ten, correctAnswer.toTree()).toTex();
|
|
38
|
+
return [first, second, third];
|
|
39
|
+
};
|
|
40
|
+
const generateExercise = () => {
|
|
41
|
+
const order = (0, randint_1.randint)(-15, -10);
|
|
42
|
+
const multiplier = +(0, randfloat_1.randfloat)(1, 11).toFixed(1);
|
|
43
|
+
const diameter = new measure_1.Measure(multiplier, order, distanceUnits_1.DistanceUnit.m);
|
|
44
|
+
const answer = multiplier > 5
|
|
45
|
+
? new powerNode_1.PowerNode(ten, (order + 1).toTree())
|
|
46
|
+
: new powerNode_1.PowerNode(ten, order.toTree());
|
|
47
|
+
const instruction = `Supposons qu'on ait un atome de diamètre $${diameter.toTex()}$. Indiquez l'ordre de grandeur du diamètre de cet atome.`;
|
|
48
|
+
return {
|
|
49
|
+
answer,
|
|
50
|
+
order,
|
|
51
|
+
diameter,
|
|
52
|
+
multiplier,
|
|
53
|
+
instruction,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.orderOfMagnitude = {
|
|
57
|
+
id: "orderOfMagnitude",
|
|
58
|
+
label: "Calcul d'ordre de grandeur",
|
|
59
|
+
levels: ["2nde"],
|
|
60
|
+
isSingleStep: true,
|
|
61
|
+
sections: ["Chimie organique"],
|
|
62
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getOrderOfMagnitudeQuestion, nb),
|
|
63
|
+
qcmTimer: 60,
|
|
64
|
+
freeTimer: 60,
|
|
65
|
+
getPropositions,
|
|
66
|
+
isAnswerValid,
|
|
67
|
+
subject: "Chimie",
|
|
68
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"potentialEnergy.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/potentialEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EACT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"potentialEnergy.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/potentialEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAuDF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -5,15 +5,27 @@ const exercise_1 = require("../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const frenchify_1 = require("../../math/utils/latex/frenchify");
|
|
7
7
|
const round_1 = require("../../math/utils/round");
|
|
8
|
+
const gravity_1 = require("../../pc/constants/gravity");
|
|
9
|
+
const measure_1 = require("../../pc/measure/measure");
|
|
10
|
+
const distanceUnits_1 = require("../../pc/units/distanceUnits");
|
|
11
|
+
const energyUnit_1 = require("../../pc/units/energyUnit");
|
|
12
|
+
const massUnits_1 = require("../../pc/units/massUnits");
|
|
8
13
|
const shuffle_1 = require("../../utils/shuffle");
|
|
9
14
|
const getPotentialEnergy = () => {
|
|
10
15
|
const mass = Math.floor(Math.random() * 10 + 1); // Masse de l'objet entre 1 et 11 kg
|
|
16
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
11
17
|
const height = Math.floor(Math.random() * 50 + 1); // Hauteur par rapport à la référence entre 1 et 51 m
|
|
12
|
-
const
|
|
18
|
+
const heightMeasure = new measure_1.Measure(height, 0, distanceUnits_1.DistanceUnit.m);
|
|
13
19
|
const potentialEnergy = mass * 9.81 * height;
|
|
14
|
-
const instruction = `Un objet de masse $${
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
const instruction = `Un objet de masse $${massMeasure.toTex({
|
|
21
|
+
notScientific: true,
|
|
22
|
+
})}$ est suspendu à une hauteur de $${heightMeasure.toTex({
|
|
23
|
+
notScientific: true,
|
|
24
|
+
})}$. Il est ensuite relâché et tombe librement.
|
|
25
|
+
$\\\\$ Calculer l'énergie potentielle de l'objet. (Supposons que l'accélération due à la gravité est de $${gravity_1.earthGravityAcceleration.measure
|
|
26
|
+
.toSignificant(2)
|
|
27
|
+
.toTex()}$)`;
|
|
28
|
+
const answer = `${(0, frenchify_1.frenchify)((0, round_1.round)(potentialEnergy, 2))}${energyUnit_1.EnergyUnit.J.toTex()}`;
|
|
17
29
|
const question = {
|
|
18
30
|
instruction,
|
|
19
31
|
startStatement: "Ep",
|
|
@@ -34,7 +46,7 @@ const getPropositions = (n, { answer, height, mass }) => {
|
|
|
34
46
|
return (0, shuffle_1.shuffle)(propositions);
|
|
35
47
|
};
|
|
36
48
|
const isAnswerValid = (ans, { answer }) => {
|
|
37
|
-
return ans
|
|
49
|
+
return [ans, ans.replace("J", energyUnit_1.EnergyUnit.J.toTex())].includes(answer);
|
|
38
50
|
};
|
|
39
51
|
exports.potentialEnergy = {
|
|
40
52
|
id: "potentialEnergy",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculatePowerOfLight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/power/calculatePowerOfLight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqFF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAavD,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculatePowerOfLight = 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 measure_1 = require("../../../pc/measure/measure");
|
|
8
|
+
const distanceUnits_1 = require("../../../pc/units/distanceUnits");
|
|
9
|
+
const divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
10
|
+
const powerUnits_1 = require("../../../pc/units/powerUnits");
|
|
11
|
+
const wattUnit_1 = require("../../../pc/units/wattUnit");
|
|
12
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
13
|
+
const two = new numberNode_1.NumberNode(2);
|
|
14
|
+
const getCalculatePowerOfLightQuestion = () => {
|
|
15
|
+
const exo = getExercise();
|
|
16
|
+
const question = {
|
|
17
|
+
answer: exo.answer,
|
|
18
|
+
instruction: exo.instruction,
|
|
19
|
+
keys: [],
|
|
20
|
+
hint: exo.hint,
|
|
21
|
+
correction: exo.correction,
|
|
22
|
+
answerFormat: "tex",
|
|
23
|
+
identifiers: {
|
|
24
|
+
E: exo.E.significantPart * Math.pow(10, exo.E.exponent),
|
|
25
|
+
S: exo.S.significantPart * Math.pow(10, exo.S.exponent),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
return question;
|
|
29
|
+
};
|
|
30
|
+
const getPropositions = (n, { answer, E, S }) => {
|
|
31
|
+
const propositions = [];
|
|
32
|
+
(0, exercise_1.addValidProp)(propositions, answer + `\\ ${wattUnit_1.WattUnit.W.toTex()}`);
|
|
33
|
+
generatePropositions(E, S).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex({ notScientific: true })));
|
|
34
|
+
let random;
|
|
35
|
+
while (propositions.length < n) {
|
|
36
|
+
random = (0, randint_1.randint)(E * S - 10, E * S + 10, [E]);
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure(random, 0, wattUnit_1.WattUnit.W).toTex({ notScientific: true }));
|
|
38
|
+
}
|
|
39
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
40
|
+
};
|
|
41
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
42
|
+
return ans === answer;
|
|
43
|
+
};
|
|
44
|
+
const generatePropositions = (E, S) => {
|
|
45
|
+
const first = new measure_1.Measure(Math.floor(E / S), 0, wattUnit_1.WattUnit.W);
|
|
46
|
+
return [first];
|
|
47
|
+
};
|
|
48
|
+
const getExercise = () => {
|
|
49
|
+
const E = new measure_1.Measure((0, randint_1.randint)(10, 30), 0, new divideUnit_1.DivideUnit(wattUnit_1.WattUnit.W, new powerUnits_1.PowerUnit(distanceUnits_1.DistanceUnit.m, two)));
|
|
50
|
+
const S = new measure_1.Measure((0, randint_1.randint)(3, 11), 0, new powerUnits_1.PowerUnit(distanceUnits_1.DistanceUnit.m, two));
|
|
51
|
+
const lightPower = E.times(S).toSignificant(2);
|
|
52
|
+
const instruction = `Une cellule photovoltaïque est exposée à une lumière dont l'éclairement $E$ est de $${E.toTex({ notScientific: true })}$.\n \\
|
|
53
|
+
La surface utile $S$ de cette cellule est de $${S.toTex({
|
|
54
|
+
notScientific: true,
|
|
55
|
+
})}$. Calculez la puissance lumineuse reçue par la cellule photovoltaïque. $${lightPower.toTex({ notScientific: true })}$`;
|
|
56
|
+
const hint = `Rappel : La puissance lumineuse reçue $P$, exprimée en $${wattUnit_1.WattUnit.W.toTex()}$, est donnée par la formule :
|
|
57
|
+
- $P=E \\cdot S$
|
|
58
|
+
`;
|
|
59
|
+
const correction = `En appliquant la formule $P=E \\cdot S$ on obtient :
|
|
60
|
+
- $P=${E.toTex({ notScientific: true })} \\times ${S.toTex({
|
|
61
|
+
notScientific: true,
|
|
62
|
+
})}\\ \\Rightarrow P=${lightPower.toTex({ notScientific: true })}$`;
|
|
63
|
+
return {
|
|
64
|
+
instruction,
|
|
65
|
+
answer: lightPower.toTex({ hideUnit: true, notScientific: true }),
|
|
66
|
+
hint,
|
|
67
|
+
correction,
|
|
68
|
+
E,
|
|
69
|
+
S,
|
|
70
|
+
lightPower,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
exports.calculatePowerOfLight = {
|
|
74
|
+
id: "calculatePowerOfLight",
|
|
75
|
+
label: "Calcul de puissance lumineuse.",
|
|
76
|
+
levels: ["1reSpé"],
|
|
77
|
+
isSingleStep: true,
|
|
78
|
+
sections: ["Lumière"],
|
|
79
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalculatePowerOfLightQuestion, nb),
|
|
80
|
+
qcmTimer: 60,
|
|
81
|
+
freeTimer: 60,
|
|
82
|
+
getPropositions,
|
|
83
|
+
isAnswerValid,
|
|
84
|
+
subject: "Physique",
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/power/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./calculatePowerOfLight"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkHtB,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAavE,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recognizeRefractionOrReflectionAngles = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const colors_1 = require("../../geogebra/colors");
|
|
7
|
+
const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
|
|
8
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
9
|
+
const random_1 = require("../../utils/random");
|
|
10
|
+
const IsAsking = {
|
|
11
|
+
RefractionAngle: "Angle de réfraction",
|
|
12
|
+
ReflectionAngle: "Angle de réflexion",
|
|
13
|
+
IncidenceAngle: "Angle d'incidence",
|
|
14
|
+
};
|
|
15
|
+
const questionAngle = [
|
|
16
|
+
IsAsking.ReflectionAngle,
|
|
17
|
+
IsAsking.IncidenceAngle,
|
|
18
|
+
IsAsking.RefractionAngle,
|
|
19
|
+
];
|
|
20
|
+
const getRecognizeRefractionOrReflectionAnglesQuestion = () => {
|
|
21
|
+
const exo = generateExercise();
|
|
22
|
+
const question = {
|
|
23
|
+
answer: exo.isAsking,
|
|
24
|
+
instruction: `Un rayon arrive sur la surface de séparation entre deux milieux. Comment appelle-t-on l'angle représenté ci-dessous ?`,
|
|
25
|
+
keys: [],
|
|
26
|
+
commands: exo.ggb.commands,
|
|
27
|
+
coords: exo.coords,
|
|
28
|
+
options: exo.ggb.getOptions(),
|
|
29
|
+
answerFormat: "raw",
|
|
30
|
+
identifiers: {},
|
|
31
|
+
};
|
|
32
|
+
return question;
|
|
33
|
+
};
|
|
34
|
+
const getPropositions = (n, { answer }) => {
|
|
35
|
+
const propositions = [];
|
|
36
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Angle d'incidence", "raw");
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Angle de réfraction", "raw");
|
|
39
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Angle de réflexion", "raw");
|
|
40
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
41
|
+
};
|
|
42
|
+
const generateExercise = () => {
|
|
43
|
+
const enetringLight = { x1: (0, randint_1.randint)(-20, -10), y1: (0, randint_1.randint)(15, 21) };
|
|
44
|
+
const reflectionLight = { x2: -enetringLight.x1, y2: enetringLight.y1 };
|
|
45
|
+
const refractingLight = {
|
|
46
|
+
x2: reflectionLight.x2 - (0, randint_1.randint)(5, 10),
|
|
47
|
+
y2: -reflectionLight.y2,
|
|
48
|
+
};
|
|
49
|
+
const isAsking = (0, random_1.random)(questionAngle);
|
|
50
|
+
const angle = getAngle(isAsking, enetringLight);
|
|
51
|
+
const commands = [
|
|
52
|
+
`E = Vector((${enetringLight.x1},${enetringLight.y1}), (0,0))`,
|
|
53
|
+
`R = Vector((0,0), (${reflectionLight.x2},${reflectionLight.y2}))`,
|
|
54
|
+
`I = Vector((0,0), (${refractingLight.x2},${refractingLight.y2}))`,
|
|
55
|
+
angle,
|
|
56
|
+
`DashedLine = Line((0,0),(0,5))`,
|
|
57
|
+
`Y = Line((0,0),(5,0))`,
|
|
58
|
+
`Text("\\tiny \\text{Surface de séparation}", (-12,0),false,true)`,
|
|
59
|
+
`Text("\\tiny \\text{Milieu 1}", (9,2.5),false,true)`,
|
|
60
|
+
`Text("\\tiny \\text{Milieu 2}", (9,0),false,true)`,
|
|
61
|
+
`YText = Text(RotateText("\\tiny \\text{Rayon incident}",-90°+${getAngle(IsAsking.IncidenceAngle, enetringLight).substring(6)}), (${enetringLight.x1 / 2 - 1.5},${enetringLight.y1 / 2}),false,true)`,
|
|
62
|
+
`SetLineStyle(DashedLine,2)`,
|
|
63
|
+
`ShowLabel(Ang,false)`,
|
|
64
|
+
`SetColor(E,"#F78D04")`,
|
|
65
|
+
`SetColor(R,"#F78D04")`,
|
|
66
|
+
`SetColor(I,"#F78D04")`,
|
|
67
|
+
`SetColor(YText,"${colors_1.orangeDark}")`,
|
|
68
|
+
`SetFixed(E,true)`,
|
|
69
|
+
`SetFixed(R,true)`,
|
|
70
|
+
`SetFixed(I,true)`,
|
|
71
|
+
`SetFixed(DashedLine,true)`,
|
|
72
|
+
`SetFixed(Y,true)`,
|
|
73
|
+
`First = Polygon((15, 0), (15,12), (-15, 12), (-15, 0))`,
|
|
74
|
+
`Second = Polygon((15, 0), (15,-12), (-15, -12), (-15, 0))`,
|
|
75
|
+
`SetColor(First,"${colors_1.blueMain}")`,
|
|
76
|
+
`SetColor(Second,"#0a6a01")`,
|
|
77
|
+
`SetColor(Ang,"#6a0101")`,
|
|
78
|
+
];
|
|
79
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
|
|
80
|
+
hideGrid: true,
|
|
81
|
+
hideAxes: true,
|
|
82
|
+
});
|
|
83
|
+
const coords = [-10, 10, -10, 10];
|
|
84
|
+
return {
|
|
85
|
+
enetringLight,
|
|
86
|
+
reflectionLight,
|
|
87
|
+
commands,
|
|
88
|
+
coords,
|
|
89
|
+
ggb,
|
|
90
|
+
isAsking,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
const getAngle = (isAsking, enetringLight = { x1: 0, y1: 0 }) => {
|
|
94
|
+
switch (isAsking) {
|
|
95
|
+
case IsAsking.RefractionAngle:
|
|
96
|
+
return `Ang = Angle(Vector((0,0), (0,-5)),I)`;
|
|
97
|
+
case IsAsking.ReflectionAngle:
|
|
98
|
+
return `Ang = Angle(R,Vector((0,0), (0,5)))`;
|
|
99
|
+
case IsAsking.IncidenceAngle:
|
|
100
|
+
return `Ang = Angle(Line((0,0), (0,5)),Line((0,0),(${enetringLight.x1},${enetringLight.y1})))`;
|
|
101
|
+
default:
|
|
102
|
+
return "";
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
exports.recognizeRefractionOrReflectionAngles = {
|
|
106
|
+
id: "recognizeRefractionOrReflectionAngles",
|
|
107
|
+
label: "Reconaitre un anlge de reflexion, de refraction ou d'incidence",
|
|
108
|
+
levels: ["2nde"],
|
|
109
|
+
isSingleStep: true,
|
|
110
|
+
sections: ["Lumière"],
|
|
111
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getRecognizeRefractionOrReflectionAnglesQuestion, nb),
|
|
112
|
+
qcmTimer: 60,
|
|
113
|
+
freeTimer: 60,
|
|
114
|
+
getPropositions,
|
|
115
|
+
answerType: "QCM",
|
|
116
|
+
subject: "Physique",
|
|
117
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
period: number;
|
|
4
|
+
frequency: number;
|
|
5
|
+
splinePoints: number[][];
|
|
6
|
+
};
|
|
7
|
+
export declare const findPeriodOrFrequencyFromGraph: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=findPeriodOrFrequencyFromGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findPeriodOrFrequencyFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodOrFrequencyFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;AAqFF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
|