Warning, /education/gcompris/src/activities/digital_electricity/TutorialDataset.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - Dataset.qml 0002 * 0003 * SPDX-FileCopyrightText: 2017 Rudra Nil Basu <rudra.nil.basu.1996@gmail.com> 0004 * 0005 * Authors: 0006 * Bruno Coudoin <bruno.coudoin@gcompris.net> (Gtk+ version) 0007 * Rudra Nil Basu <rudra.nil.basu.1996@gmail.com> (Qt Quick port) 0008 * 0009 * SPDX-License-Identifier: GPL-3.0-or-later 0010 */ 0011 import QtQuick 2.12 0012 0013 QtObject { 0014 property var zero: { 0015 'imageName': 'zero.svg', 0016 'componentSource': 'Zero.qml', 0017 'width': 0.2, 0018 'height': 0.2, 0019 'toolTipText': qsTr("Zero input") 0020 } 0021 property var one: { 0022 'imageName': 'one.svg', 0023 'componentSource': 'One.qml', 0024 'width': 0.2, 0025 'height': 0.2, 0026 'toolTipText': qsTr("One input") 0027 } 0028 property var digitalLight: { 0029 'imageName': 'DigitalLightOff.svg', 0030 'componentSource': 'DigitalLight.qml', 0031 'width': 0.2, 0032 'height': 0.2, 0033 'toolTipText': qsTr("Digital light") 0034 } 0035 property var andGate: { 0036 'imageName': 'gateAnd.svg', 0037 'componentSource': 'AndGate.qml', 0038 'width': 0.15, 0039 'height': 0.15, 0040 'toolTipText': qsTr("AND gate") 0041 } 0042 property var orGate: { 0043 'imageName': 'gateOr.svg', 0044 'componentSource': 'OrGate.qml', 0045 'width': 0.15, 0046 'height': 0.15, 0047 'toolTipText': qsTr("OR gate") 0048 } 0049 property var notGate: { 0050 'imageName': 'gateNot.svg', 0051 'componentSource': 'NotGate.qml', 0052 'width': 0.15, 0053 'height': 0.15, 0054 'toolTipText': qsTr("NOT gate") 0055 } 0056 property var xorGate: { 0057 'imageName': 'gateXor.svg', 0058 'componentSource': 'XorGate.qml', 0059 'width': 0.15, 0060 'height': 0.15, 0061 'toolTipText': qsTr("XOR gate") 0062 } 0063 property var nandGate: { 0064 'imageName': 'gateNand.svg', 0065 'componentSource': 'NandGate.qml', 0066 'width': 0.15, 0067 'height': 0.15, 0068 'toolTipText': qsTr("NAND gate") 0069 } 0070 property var norGate: { 0071 'imageName': 'gateNor.svg', 0072 'componentSource': 'NorGate.qml', 0073 'width': 0.15, 0074 'height': 0.15, 0075 'toolTipText': qsTr("NOR gate") 0076 } 0077 property var switchKey: { 0078 'imageName': 'switchOff.svg', 0079 'componentSource': 'Switch.qml', 0080 'width': 0.15, 0081 'height': 0.15, 0082 'toolTipText': qsTr("Switch") 0083 } 0084 property var comparator: { 0085 'imageName': 'comparator.svg', 0086 'componentSource': 'Comparator.qml', 0087 'width': 0.3, 0088 'height': 0.2, 0089 'toolTipText': qsTr("Comparator") 0090 } 0091 property var bcdToSevenSegment: { 0092 'imageName': 'BCDTo7Segment.svg', 0093 'componentSource': 'BCDToSevenSegment.qml', 0094 'width': 0.3, 0095 'height': 0.4, 0096 'toolTipText': qsTr("BCD to 7 segment") 0097 } 0098 property var sevenSegmentDisplay: { 0099 'imageName': 'sevenSegmentDisplay.svg', 0100 'componentSource': 'SevenSegment.qml', 0101 'width': 0.225, 0102 'height': 0.4, 0103 'toolTipText': qsTr("7 segment display") 0104 } 0105 property var signalGenerator: { 0106 'imageName': 'signalGenerator.svg', 0107 'componentSource': 'SignalGenerator.qml', 0108 'width': 0.3, 0109 'height': 0.2, 0110 'toolTipText': qsTr("Signal generator") 0111 } 0112 property var bcdCounter: { 0113 'imageName': 'bcdCounter.svg', 0114 'componentSource': 'BcdCounter.qml', 0115 'width': 0.225, 0116 'height': 0.4, 0117 'toolTipText': qsTr("BCD counter") 0118 } 0119 // List of all components 0120 property var componentList: [zero, one, digitalLight, andGate, orGate, 0121 notGate, xorGate, nandGate, norGate, switchKey, 0122 comparator, bcdToSevenSegment, 0123 sevenSegmentDisplay, signalGenerator, bcdCounter] 0124 0125 property var problemType: { 0126 'lightTheBulb': 1, 0127 'equation1Variable': 2, 0128 'equation2Variables': 3, 0129 'equation3Variables': 4, 0130 'others': 5 0131 } 0132 // tutorial levels 0133 property var tutorialLevels: [ 0134 // level 1 0135 { 0136 inputComponentList: [zero, one], 0137 playAreaComponentList: [digitalLight], 0138 determiningComponentsIndex: [0], 0139 wires: [], 0140 playAreaComponentPositionX: [0.4], 0141 playAreaComponentPositionY: [0.3], 0142 type: [problemType.lightTheBulb], 0143 introMessage: [ 0144 qsTr("The digital light glows when its terminal is connected with an input of 1."), 0145 qsTr("Turn on the digital light using the provided inputs.") + " " + 0146 qsTr("To connect two terminals, click on a first terminal, then on a second terminal.") 0147 ] 0148 }, 0149 // level 2 0150 { 0151 inputComponentList: [zero, one], 0152 playAreaComponentList: [andGate, digitalLight], 0153 determiningComponentsIndex: [1], 0154 wires: [ [0, 0, 1, 0] ], // from_component_index, from_terminal_no, to_component_index, to_terminal_no 0155 playAreaComponentPositionX: [0.4, 0.6], 0156 playAreaComponentPositionY: [0.3, 0.3], 0157 type: [problemType.lightTheBulb], 0158 introMessage: [ 0159 qsTr("The AND gate produces an output of 1 when both of its input terminals are of value 1."), 0160 qsTr("Turn on the digital light using an AND gate and the provided inputs.") 0161 ] 0162 }, 0163 // level 3 0164 { 0165 inputComponentList: [zero, one], 0166 playAreaComponentList: [orGate, digitalLight], 0167 determiningComponentsIndex: [1], 0168 wires: [ [0, 0, 1, 0] ], 0169 playAreaComponentPositionX: [0.4, 0.6], 0170 playAreaComponentPositionY: [0.3, 0.3], 0171 type: [problemType.lightTheBulb], 0172 introMessage: [ 0173 qsTr("The OR gate produces an output of 1 when at least one of its input terminals is of value 1."), 0174 qsTr("Turn on the digital light using an OR gate and the provided inputs.") 0175 ] 0176 }, 0177 // level 4 0178 { 0179 inputComponentList: [zero], 0180 playAreaComponentList: [zero, one, orGate, andGate, digitalLight], 0181 determiningComponentsIndex: [4], 0182 wires: [ [0, 0, 2, 0], [2, 0, 3, 0], [3, 0, 4, 0]], 0183 playAreaComponentPositionX: [0.0, 0.0, 0.2, 0.4, 0.6], 0184 playAreaComponentPositionY: [0.0, 0.4, 0.2, 0.2, 0.3], 0185 type: [problemType.lightTheBulb], 0186 introMessage: [ 0187 qsTr("You can draw multiple wires from the output terminal of a component."), 0188 qsTr("Turn on the digital light using the provided components.") 0189 ] 0190 }, 0191 // level 5 0192 { 0193 inputComponentList: [zero], 0194 playAreaComponentList: [notGate, notGate, orGate, orGate, andGate, digitalLight], 0195 determiningComponentsIndex: [5], 0196 wires: [ [4, 0, 5, 0], [2, 0, 4, 0], [3, 0, 4, 1]], 0197 playAreaComponentPositionX: [0.05, 0.05, 0.3, 0.3, 0.35, 0.58], 0198 playAreaComponentPositionY: [0.1, 0.4, 0.05, 0.45, 0.25, 0.25], 0199 type: [problemType.lightTheBulb], 0200 introMessage: [ 0201 qsTr("The NOT gate takes a single binary input and flips the value in the output."), 0202 qsTr("Turn on the digital light using the provided inputs.") 0203 ] 0204 }, 0205 // level 6 0206 { 0207 inputComponentList: [zero, one], 0208 playAreaComponentList: [nandGate, digitalLight], 0209 determiningComponentsIndex: [1], 0210 wires: [ [0, 0, 1, 0] ], 0211 playAreaComponentPositionX: [0.25, 0.6], 0212 playAreaComponentPositionY: [0.3, 0.3], 0213 type: [problemType.lightTheBulb], 0214 introMessage: [ 0215 qsTr("The NAND gate takes two binary inputs and produces one binary output."), 0216 qsTr("The output of the NAND gate is zero if both of its inputs are 1. Else, the output is one."), 0217 qsTr("For a more detailed description about the NAND gate, select it and click on the info button."), 0218 qsTr("Light the bulb using the provided NAND gate.") 0219 ] 0220 }, 0221 // level 7 0222 { 0223 inputComponentList: [andGate, orGate], 0224 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0225 determiningComponentsIndex: [1, 2, 3], 0226 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0227 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0228 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0229 type: [problemType.equation2Variables], 0230 result: function (A, B) { 0231 return A & B 0232 }, 0233 introMessage: [ 0234 qsTr("Create a circuit using the provided components so that the bulb glows only when both of the switches are turned on.") 0235 ] 0236 }, 0237 // level 8 0238 { 0239 inputComponentList: [andGate, orGate], 0240 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0241 determiningComponentsIndex: [1, 2, 3], 0242 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0243 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0244 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0245 type: [problemType.equation2Variables], 0246 result: function (A, B) { 0247 return A | B 0248 }, 0249 introMessage: [ 0250 qsTr("Create a circuit using the provided components so that the bulb glows when either of the switch is turned on.") 0251 ] 0252 }, 0253 // level 9 0254 { 0255 inputComponentList: [zero, one, andGate, orGate], 0256 playAreaComponentList: [switchKey, switchKey, switchKey, digitalLight], 0257 determiningComponentsIndex: [0, 1, 2, 3], 0258 wires: [], 0259 playAreaComponentPositionX: [0.1, 0.1, 0.1, 0.5], 0260 playAreaComponentPositionY: [0.0, 0.25, 0.55, 0.25], 0261 type: [problemType.equation3Variables], 0262 result: function (A, B, C) { 0263 return A & B & C 0264 }, 0265 introMessage: [ 0266 qsTr("Light the bulb using the three switches so that the bulb glows only if all the three switches are turned on.") 0267 ] 0268 }, 0269 // level 10 0270 { 0271 inputComponentList: [zero, one, andGate, orGate], 0272 playAreaComponentList: [switchKey, switchKey, switchKey, digitalLight], 0273 determiningComponentsIndex: [0, 1, 2, 3], 0274 wires: [], 0275 playAreaComponentPositionX: [0.1, 0.1, 0.1, 0.5], 0276 playAreaComponentPositionY: [0.0, 0.25, 0.55, 0.25], 0277 type: [problemType.equation3Variables], 0278 result: function (A, B, C) { 0279 return A | B | C 0280 }, 0281 introMessage: [ 0282 qsTr("Light the bulb using the three switches so that the bulb glows if any of the switches are turned on.") 0283 ] 0284 }, 0285 // level 11 0286 { 0287 inputComponentList: [zero, andGate, orGate, notGate], 0288 playAreaComponentList: [switchKey, digitalLight], 0289 determiningComponentsIndex: [0, 1], 0290 wires: [], 0291 playAreaComponentPositionX: [0.3, 0.6], 0292 playAreaComponentPositionY: [0.25, 0.25], 0293 type: [problemType.others], 0294 introMessage: [ 0295 qsTr("Use the gates so that the bulb glows only when the switch is on.") 0296 ] 0297 }, 0298 // level 12 0299 { 0300 inputComponentList: [zero, one], 0301 playAreaComponentList: [xorGate, digitalLight], 0302 determiningComponentsIndex: [1], 0303 wires: [ [0, 0, 1, 0] ], 0304 playAreaComponentPositionX: [0.25, 0.6], 0305 playAreaComponentPositionY: [0.3, 0.3], 0306 type: [problemType.lightTheBulb], 0307 introMessage: [ 0308 qsTr("The XOR Gate takes two binary inputs and produces one binary output."), 0309 qsTr("The output of the XOR gate is one if the number of 1 in the input is odd. Else, the output is zero."), 0310 qsTr("Light the bulb using the provided XOR gate.") 0311 ] 0312 }, 0313 // level 13 0314 { 0315 inputComponentList: [zero, one, xorGate], 0316 playAreaComponentList: [switchKey, switchKey, digitalLight], 0317 determiningComponentsIndex: [0, 1, 2], 0318 wires: [], 0319 playAreaComponentPositionX: [0.2, 0.2, 0.6], 0320 playAreaComponentPositionY: [0.2, 0.35, 0.25], 0321 type: [problemType.equation2Variables], 0322 result: function (A, B) { 0323 return A ^ B 0324 }, 0325 introMessage: [ 0326 qsTr("Light the bulb using the two switches so that the bulb glows when one of the switch is on and the other is off.") 0327 ] 0328 }, 0329 // level 14 0330 { 0331 inputComponentList: [zero, one, xorGate], 0332 playAreaComponentList: [switchKey, switchKey, switchKey, digitalLight], 0333 determiningComponentsIndex: [0, 1, 2, 3], 0334 wires: [], 0335 playAreaComponentPositionX: [0.1, 0.1, 0.1, 0.5], 0336 playAreaComponentPositionY: [0.0, 0.25, 0.55, 0.25], 0337 type: [problemType.equation3Variables], 0338 result: function (A, B, C) { 0339 return A ^ B ^ C 0340 }, 0341 introMessage: [ 0342 qsTr("Light the bulb using the three switches so that the bulb glows when odd number of the switches are turned on.") 0343 ] 0344 }, 0345 // level 15 0346 { 0347 inputComponentList: [one, notGate], 0348 playAreaComponentList: [norGate, digitalLight], 0349 determiningComponentsIndex: [1], 0350 wires: [ [0, 0, 1, 0] ], 0351 playAreaComponentPositionX: [0.25, 0.6], 0352 playAreaComponentPositionY: [0.3, 0.3], 0353 type: [problemType.lightTheBulb], 0354 introMessage: [ 0355 qsTr("A NOR gate takes 2 binary inputs and outputs 1 if both of them are 0, otherwise produces an output of 0."), 0356 qsTr("For a more detailed description about the NOR gate, select it and click on the info button."), 0357 qsTr("Light the bulb using the provided NOR gate.") 0358 ] 0359 }, 0360 // level 16 0361 { 0362 inputComponentList: [nandGate], 0363 playAreaComponentList: [one, switchKey, digitalLight], 0364 determiningComponentsIndex: [1, 2], 0365 wires: [ [0, 0, 1, 0] ], 0366 playAreaComponentPositionX: [0.0, 0.3, 0.6], 0367 playAreaComponentPositionY: [0.25, 0.25, 0.25], 0368 type: [problemType.equation1Variable], 0369 introMessage: [ 0370 qsTr("Use the gates so that the bulb glows only when the switch is turned off and doesn't glow when the switch is turned on.") 0371 ] 0372 }, 0373 // level 17 0374 { 0375 inputComponentList: [nandGate], 0376 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0377 determiningComponentsIndex: [1, 2, 3], 0378 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0379 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0380 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0381 type: [problemType.equation2Variables], 0382 result: function (A, B) { 0383 return A & B 0384 }, 0385 introMessage: [ 0386 qsTr("Create a circuit using the provided components so that the bulb glows only when both of the switches are turned on.") 0387 ] 0388 }, 0389 // level 18 0390 { 0391 inputComponentList: [nandGate], 0392 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0393 determiningComponentsIndex: [1, 2, 3], 0394 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0395 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0396 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0397 type: [problemType.equation2Variables], 0398 result: function (A, B) { 0399 return A | B 0400 }, 0401 introMessage: [ 0402 qsTr("Create a circuit using the provided components so that the bulb glows when either of the switch is turned on.") 0403 ] 0404 }, 0405 // level 19 0406 { 0407 inputComponentList: [nandGate], 0408 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0409 determiningComponentsIndex: [1, 2, 3], 0410 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0411 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0412 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0413 type: [problemType.equation2Variables], 0414 result: function (A, B) { 0415 return !(A | B) 0416 }, 0417 introMessage: [ 0418 qsTr("Create a circuit using the provided components so that the bulb glows only when both of the switches are turned off.") 0419 ] 0420 }, 0421 // level 20 0422 { 0423 inputComponentList: [zero, one, andGate, orGate, nandGate], 0424 playAreaComponentList: [switchKey, switchKey, switchKey, digitalLight], 0425 determiningComponentsIndex: [0, 1, 2, 3], 0426 wires: [], 0427 playAreaComponentPositionX: [0.1, 0.1, 0.1, 0.5], 0428 playAreaComponentPositionY: [0.0, 0.25, 0.55, 0.25], 0429 type: [problemType.equation3Variables], 0430 result: function (A, B, C) { 0431 return A | (B & C) 0432 }, 0433 introMessage: [ 0434 qsTr("Light the bulb using the provided components so that the bulb glows if the first switch is turned ON, or if both the second and the third switches are turned on.") 0435 ] 0436 }, 0437 // level 21 0438 { 0439 inputComponentList: [norGate], 0440 playAreaComponentList: [one, switchKey, digitalLight], 0441 determiningComponentsIndex: [1, 2], 0442 wires: [ [0, 0, 1, 0] ], 0443 playAreaComponentPositionX: [0.0, 0.3, 0.6], 0444 playAreaComponentPositionY: [0.25, 0.25, 0.25], 0445 type: [problemType.equation1Variable], 0446 introMessage: [ 0447 qsTr("Use the gates so that the bulb glows when the switch is turned off and doesn't glow when the switch is turned on.") 0448 ] 0449 }, 0450 // level 22 0451 { 0452 inputComponentList: [norGate], 0453 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0454 determiningComponentsIndex: [1, 2, 3], 0455 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0456 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0457 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0458 type: [problemType.equation2Variables], 0459 result: function (A, B) { 0460 return A & B 0461 }, 0462 introMessage: [ 0463 qsTr("Create a circuit using the provided components so that the bulb glows only when both of the switches are turned on.") 0464 ] 0465 }, 0466 // level 23 0467 { 0468 inputComponentList: [norGate], 0469 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0470 determiningComponentsIndex: [1, 2, 3], 0471 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0472 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0473 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0474 type: [problemType.equation2Variables], 0475 result: function (A, B) { 0476 return A | B 0477 }, 0478 introMessage: [ 0479 qsTr("Create a circuit using the provided components so that the bulb glows when either of the switches are turned on.") 0480 ] 0481 }, 0482 // level 24 0483 { 0484 inputComponentList: [norGate], 0485 playAreaComponentList: [one, switchKey, switchKey, digitalLight], 0486 determiningComponentsIndex: [1, 2, 3], 0487 wires: [ [0, 0, 1, 0], [0, 0, 2, 0] ], 0488 playAreaComponentPositionX: [0.0, 0.2, 0.2, 0.6], 0489 playAreaComponentPositionY: [0.25, 0.2, 0.35, 0.25], 0490 type: [problemType.equation2Variables], 0491 result: function (A, B) { 0492 return !(A & B) 0493 }, 0494 introMessage: [ 0495 qsTr("Create a circuit using the provided components so that the bulb glows when at least one of the switches is turned off.") 0496 ] 0497 }, 0498 // level 25 0499 { 0500 inputComponentList: [one, andGate, notGate, norGate, xorGate, nandGate, orGate], 0501 playAreaComponentList: [switchKey, switchKey, comparator, digitalLight], 0502 determiningComponentsIndex: [0, 1, 3], 0503 wires: [ ], 0504 playAreaComponentPositionX: [0.02, 0.02, 0.2, 0.6], 0505 playAreaComponentPositionY: [0.05, 0.5, 0.25, 0.25], 0506 type: [problemType.equation2Variables], 0507 result: function (A, B) { 0508 return A <= B 0509 }, 0510 introMessage: [ 0511 qsTr("A comparator takes two numbers (A and B) as input and produces 3 values as output. The first value is 1 if A < B, the second value is 1 if A = B and the third value is 1 if A > B."), 0512 qsTr("Create a circuit using the provided components so that the bulb glows when the output of the first switch is less than or equal to the output of the second switch.") 0513 ] 0514 }, 0515 // level 26 0516 { 0517 inputComponentList: [one, switchKey, nandGate, norGate, andGate, orGate, notGate], 0518 playAreaComponentList: [bcdToSevenSegment, sevenSegmentDisplay], 0519 determiningComponentsIndex: [0, 1], 0520 wires: [ [0, 0, 1, 0], [0, 1, 1, 1], [0, 2, 1, 2], [0, 3, 1, 3], [0, 4, 1, 4], [0, 5, 1, 5], [0, 6, 1, 6] ], 0521 playAreaComponentPositionX: [0.2, 0.6], 0522 playAreaComponentPositionY: [0.1, 0.1], 0523 type: [problemType.others], 0524 introMessage: [ 0525 qsTr("The component in the middle is a BCD to seven segment converter."), 0526 qsTr("It takes 4 bits as input represented in the binary coded decimal (BCD) format and converts the BCD number into a seven segment code."), 0527 qsTr("The output of the converter is connected to the seven segment display, to view the value of the input provided."), 0528 qsTr("Display the number 6 in the seven segment display.") 0529 ] 0530 }, 0531 // level 27 0532 { 0533 inputComponentList: [one, switchKey, nandGate, norGate, andGate, orGate, notGate], 0534 playAreaComponentList: [signalGenerator, bcdCounter, bcdToSevenSegment, sevenSegmentDisplay], 0535 determiningComponentsIndex: [1, 2], 0536 wires: [ [2, 0, 3, 0], [2, 1, 3, 1], [2, 2, 3, 2], [2, 3, 3, 3], [2, 4, 3, 4], [2, 5, 3, 5], [2, 6, 3, 6] ], 0537 playAreaComponentPositionX: [0.0, 0.0, 0.27, 0.6], 0538 playAreaComponentPositionY: [0.0, 0.3, 0.1, 0.1], 0539 type: [problemType.others], 0540 introMessage: [ 0541 qsTr("The signal generator on the left is used to generate alternating signals between 0 and 1 in a given time period taken as input. The time period by default is 1 second, but it can be changed between 0.25 and 2s."), 0542 qsTr("The BCD counter placed under it is a special type of counter which can count from 0 to 9 and back to 0 on application of a clock signal."), 0543 qsTr("Connect the components to make sure that the count of 0 to 9 is visible in the provided seven segment display.") 0544 ] 0545 }, 0546 // level 28 0547 { 0548 inputComponentList: [zero, notGate, orGate, andGate], 0549 playAreaComponentList: [one, one, switchKey, switchKey, digitalLight], 0550 determiningComponentsIndex: [2, 3, 4], 0551 wires: [ ], 0552 playAreaComponentPositionX: [0.0, 0.0, 0.2, 0.2, 0.6], 0553 playAreaComponentPositionY: [0.0, 0.5, 0.15, 0.4, 0.27], 0554 type: [problemType.equation2Variables], 0555 result: function (A, B) { 0556 return A ^ B 0557 }, 0558 introMessage: [ 0559 qsTr("Light the bulb using both the switches so that the bulb glows only when either the first switch is on and the second switch is off, or when the first switch is off and the second switch is on.") 0560 ] 0561 } 0562 ] 0563 }