File indexing completed on 2024-04-28 15:07:52
0001 /* GCompris - dataset.js 0002 * 0003 * SPDX-FileCopyrightText: 2016 Rahul Yadav <rahulyadav170923@gmail.com> 0004 * 0005 * Authors: 0006 * Pascal Georges <pascal.georges1@free.fr> (GTK+ version) 0007 * RAHUL YADAV <rahulyadav170923@gmail.com> (Qt Quick port) 0008 * 0009 * SPDX-License-Identifier: GPL-3.0-or-later 0010 */ 0011 0012 // questions according to operators 0013 0014 /* 0015 format of the dataset 0016 outermost array contains four arrays according to number of operator used in the Questions array. 0017 0018 Question array = [[operators used],[Questions]] 0019 0020 Question = [[operands],result] 0021 0022 */ 0023 0024 var dataset = [ 0025 [ 0026 [['+'],[ [[1,2,4],3] , [[3,4,5],7] ,[[6,2,7],8] ,[[5,2,4],7] ,[[9,2,4],11] ,[[4,6,2],6],[[1,6],7] ,[[3,2],5] ,[[13,1],14] ,[[5,8],13] ]], 0027 [['-'],[ [[2,1,3],1] , [[3,1,0],2] ,[[7,2,3],5] ,[[6,2,2],4] ,[[9,2,4],7] ,[[8,5,5],3],[[9,5,3],4],[[18,9,8],9],[[5,1,2],4],[[6,3,7],3],[[5,4,1],1] ] ], 0028 [['*'],[ [[2,1,3],2] , [[3,1,4],3] ,[[7,2,5],14] ,[[6,2,1],12] ,[[9,2,3],18] ,[[8,5,5],40],[[9,5,6],45],[[1,9,2],9],[[5,1,4],5] ]], 0029 [['/'],[ [[2,1,4],2] , [[3,1,2],3] ,[[8,2,1],4] ,[[6,2,7],3] ,[[9,3,2],3] ,[[8,4,2 ],2],[[9,3,4],3],[[18,9,3],2] ]] 0030 ], 0031 0032 [ 0033 [['+','-'],[ [[1,2,4,5],5] , [[1,2,4,6],5] ,[[3,4,5,7],2] ,[[8,7,9,7],6] ,[[9,4,6,7],7] ,[[3,4,5,7],6] ,[[6,4,5,7],5] ]], 0034 [['+','*'],[ [[1,2,4,6],12] , [[1,2,4,7],9] ,[[3,4,5,8],35] ,[[2,7,9,3],23] ,[[1,4,6,5],30] ,[[2,4,5,6],13] ,[[3,6,5,3],23] ]], 0035 [['+','/'],[ [[1,2,4,2],6] , [[1,2,4,1],6] ,[[3,6,5,5],7] ,[[9,3,3,4],3] ,[[1,4,2,2],2] ,[[5,10,15,7],13] ]], 0036 [['-','*'],[ [[1,2,4,3],4] , [[1,2,4,9],2] ,[[3,4,5,1],8] ,[[8,7,9,3],9] ,[[9,4,6,2],30] ]], 0037 [['-','/'],[ [[1,2,4,7],2] , [[1,2,5,2],3] ,[[1,10,5,3],1] ,[[1,3,9,5],2] ,[[12,2,5,1],1] ]], 0038 [['*','/'],[ [[1,2,4,3],8] , [[1,2,4,2],2] ,[[3,3,6,2],6] ,[[15,5,4,6],18] ,[[14,7,3,0],6] ]], 0039 ], 0040 0041 [ 0042 [['+','-','*'],[ [[1,4,3,5],10] , [[1,3,3,5],5] ,[[5,4,3,5],30] ,[[1,2,6,5],25] ]], 0043 [['-','*','/'],[ [[1,4,3,3],3] ,[[3,4,3,3],1] ,[[7,4,2,1],6] ,[[8,4,2,4],2] ,[[9,4,5,3],3] ]], 0044 [['*','/','+'],[ [[1,8,4,3],5] , [[10,8,9,3],5] ,[[9,1,3,3],6] ,[[5,8,4,3],13] ]], 0045 [['/','+','-'],[ [[2,8,2,3],3] , [[10,2,9,3],11] ,[[9,3,3,2],4] ,[[5,5,4,3],6] ]] 0046 ], 0047 0048 [ 0049 [['+','-','*','/'],[ [[1,7,2,3,2],13] ,[[8,1,5,2,3],6] ,[[1,7,2,4,2],5] ,[[9,7,8,2,4],4]]] 0050 ] 0051 0052 ] 0053 0054 // no of Question at each level ( total sublevels) 0055 0056 var levelSchema = [4,4,4,4,3,3,4,5] 0057 0058 // default operators at each level ( in case Built-in mode is activated ) 0059 0060 var defaultOperators = [["+"],["-"],["/"],["*"],["+","-"],["/","*"],["/","*",'+'],['-',"*","+","/"]]