{
    "path": "/home/krm/dev/mimer-academia/programing/js/next/Questions/all.sv.json",
    "s": "Ignor",
    "invert": true,
    "level": 1,
    "title": [
        "Blandade kod uppgifter"
    ],
    "status": "alpha",
    "author": [
        "krm"
    ],
    "created": {
        "year": 2025,
        "month": 4,
        "day": 1
    },
    "category": [
        "next"
    ],
    "index": 10,
    "description": [],
    "statments": [],
    "comment": [],
    "cards": [
        {
            "level": 1,
            "title": [
                "Ett program"
            ],
            "description": [
                "Detta är kod."
            ],
            "lang": "",
            "code": "const base = Numbner(prompt(\"Ge ett bastal?\"));\nconst step = Numbner(prompt(\"Ge antal steg?\"));\nlet result = 1;\nlet out = \"\";\nfor(let i = 0; i < step;i++) {\nresult = result * base;\nout = out + result;\n}\nconsole.log(result);",
            "statments": [],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 1,
            "title": [
                "Om vi ger värderna \"2\" och \"4\". Vad skrivs ut?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "6"
                    ]
                },
                {
                    "description": [
                        "4 16"
                    ]
                },
                {
                    "description": [
                        "1 1 1 1 1 1"
                    ]
                },
                {
                    "right": true,
                    "description": [
                        "2 4 8 16"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 2,
            "title": [
                "Om vi ger värderna \"4\" och \"2\". Vad skrivs ut?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "6"
                    ]
                },
                {
                    "right": true,
                    "description": [
                        "4 16"
                    ]
                },
                {
                    "description": [
                        "1 1 1 1 1 1"
                    ]
                },
                {
                    "description": [
                        "2 4 8 16"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 3,
            "title": [
                "Om vi ger värderna \"6\" och \"1\". Vad skrivs ut?"
            ],
            "description": [],
            "statments": [
                {
                    "right": true,
                    "description": [
                        "6"
                    ]
                },
                {
                    "description": [
                        "4 16"
                    ]
                },
                {
                    "description": [
                        "1 1 1 1 1 1"
                    ]
                },
                {
                    "description": [
                        "2 4 8 16"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 4,
            "title": [
                "Om vi ger värderna \"1\" och \"6\". Vad skrivs ut?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "6"
                    ]
                },
                {
                    "description": [
                        "4 16"
                    ]
                },
                {
                    "right": true,
                    "description": [
                        "1 1 1 1 1 1"
                    ]
                },
                {
                    "description": [
                        "2 4 8 16"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "Ett program"
            ],
            "description": [
                "Detta är kod."
            ],
            "lang": "",
            "code": "const word = prompt(\"Ge mig ett ord!\");\nconst max = Number(prompt(\"Ge mig ett ord!\"));\nfor(let i =0; i < max; i++) {\nconsole.log(word);\n}",
            "statments": [],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 5,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"Hello!\" och 5!"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"Hello!\\nHello!\\nHello!\\nHello!\\nHello!\\n;\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 6,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"A\" och 10!"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n;\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "Ett program"
            ],
            "description": [
                "Detta är kod."
            ],
            "lang": "",
            "code": "const blue = prompt(\"Är blå knapp ned tryckt? J\");\nconst yellow = prompt(\"Är gul knapp ned tryckt? J\");\nif(blue === \"J\" && yellow === \"J\") {\nconst power = Number(prompt(\"Tryck ned pedalen till minst 50 procent? %\"));\nif(power >= 50) {\nconsole.log(\"Maskinen körs\");\n} else {\nconsole.log(\"För lite kraft!\");\n}\n} else {\nconsole.log(\"Inte säkert att starta!\");\n}",
            "statments": [],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 7,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"J\",\"J\" och \"50\"!"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"Maskinen körs\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 8,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"J\",\"N\" och \"80\"!"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"Inte säkert att starta!\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 9,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"J\",\"J\" och \"40\"!"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"För lite kraft!\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 10,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"N\",\"J\" och \"90\"!"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"Inte säkert att starta!\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "Ett program"
            ],
            "description": [
                "Detta är kod."
            ],
            "lang": "",
            "code": "const max = prompt(\"Ge mig ett max tal\");\nlet sum = 0;\nlet denominator = 1;\nfor(let i=1; i <= max; i++) {\nsum = sum + 1/denominator;\ndenominator = denominator*2;\n}\nconsole.log(sum);",
            "statments": [],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 11,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"1\"?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "1"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 12,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"2\"?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "1.5;"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 13,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"4\"?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "1.875;"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "Collatz problem"
            ],
            "description": [
                "Detta är kod."
            ],
            "lang": "",
            "code": "let start = Number(prompt(\"Ge ett startal?\"));\nconst max = 100000 // For avide inifity loops\nlet out = \"\"\nfor(let i = 0; i < max; i++) {\nout = out + start+\" \";\nif(start%2 === 0) { // start is even\nstart = start/2;\n} else if(start !== 1) {\nstart = 3*start+1;\n} else {\nbreak;\n}\n}\nconsole.log(out.trim())",
            "statments": [],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 14,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"2\""
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"2 1\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 15,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"8\""
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "\"8 4 2 1\""
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "exactly": true,
            "index": 16,
            "title": [
                "Vad kommer programmet skriva ut om du skriver in \"3\"!"
            ],
            "description": [],
            "statments": [],
            "comment": [],
            "kind": "question"
        }
    ],
    "kind": "questions"
}