diff --git a/src/js/soal.js b/src/js/soal.js index b0e1aaf..35b691f 100644 --- a/src/js/soal.js +++ b/src/js/soal.js @@ -26,4 +26,157 @@ export const questions = [ {text: "0", correct: true}, ] }, + { + question: "How do you start a comment in Python code ?", + answers: [ + {text: "// This is a comment", correct: true}, + {text: "/* This is a comment */", correct: false}, + {text: "`this is comment`", correct: false}, + {text: "# This is a comment", correct: false}, + ] + }, + { + question: "What is the result of the following operation ? (print('5'+'5'))", + answers: [ + {text: "10", correct: false}, + {text: "55*", correct: true}, + {text: "error", correct: false}, + {text: "NaN", correct: false}, + ] + }, + { + question: "Correct string format ?", + answers: [ + {text: "'bahlil'", correct: true}, + {text: "(bahlil)", correct: false}, + {text: "[bahlil]", correct: false}, + {text: "{bahlil}", correct: false}, + ] + }, + { + question: "Correct loop syntax ?", + answers: [ + {text: "for i in range(5):", correct: true}, + {text: "loop 5 time", correct: false}, + {text: "foreach i in 5", correct: false}, + {text: "repeat", correct: false}, + ] + }, + { + question: "Function to get user input ?", + answers: [ + {text: "scan()", correct: false}, + {text: "input()", correct: true}, + {text: "error", correct: false}, + {text: "get()", correct: false}, + ] + }, + { + question: "Convert integer to string ?", + answers: [ + {text: "text(5)", correct: false}, + {text: "toStr(5)", correct: false}, + {text: "str(5)", correct: true}, + {text: "char(5)", correct: false}, + ] + }, + { + question: "Stop a loop ?", + answers: [ + {text: "break", correct: true}, + {text: "stop", correct: false}, + {text: "exit", correct: false}, + {text: "kill", correct: false}, + ] + }, + { + question: "Symbol for tuples?", + answers: [ + {text: "[ ]", correct: false}, + {text: "{ }", correct: false}, + {text: "( )", correct: true}, + {text: "< >", correct: false}, + ] + }, + { + question: "Output of int(3.9) ?", + answers: [ + {text: "4", correct: false}, + {text: "3,9", correct: false}, + {text: "3", correct: true}, + {text: "tiga koma sembilan", correct: false}, + ] + }, + { + question: "Find max number ?", + answers: [ + {text: "top()", correct: false}, + {text: "max()", correct: true}, + {text: "high()", correct: false}, + {text: "largest()", correct: false}, + ] + }, + { + question: '3 * "A" output ?', + answers: [ + {text: "error", correct: false}, + {text: "none", correct: false}, + {text: "AAA", correct: true}, + {text: "A3A", correct: false}, + ] + }, + { + question: "Logical OR operator ?", + answers: [ + {text: "||", correct: false}, + {text: "%%", correct: false}, + {text: "or", correct: true}, + {text: "&&", correct: false}, + ] + }, + { + question: "result of not True ?", + answers: [ + {text: "true", correct: false}, + {text: "false", correct: true}, + {text: "null", correct: false}, + {text: "0", correct: false}, + ] + }, + { + question: "Check if item exists ?", + answers: [ + {text: "exists", correct: false}, + {text: "inside", correct: false}, + {text: "in", correct: true}, + {text: "has", correct: false}, + ] + }, + { + question: "x += 1 means?", + answers: [ + {text: "x = 1", correct: false}, + {text: "x = x + 1", correct: true}, + {text: "x = x - 1", correct: false}, + {text: "idk", correct: false}, + ] + }, + { + question: "Define a class ?", + answers: [ + {text: "struct", correct: false}, + {text: "object", correct: false}, + {text: "type", correct: false}, + {text: "class", correct: true}, + ] + }, + { + question: "how much data type in python ?", + answers: [ + {text: "5", correct: true}, + {text: "1", correct: false}, + {text: "2", correct: false}, + {text: "100", correct: false}, + ] + }, ]; \ No newline at end of file