| {"id": "PROG-1115", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1359", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0477", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1036", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1699", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0236", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1762", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1572", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0933", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0827", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0757", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0458", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0016", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1656", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1674", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1207", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0001", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1245", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0672", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0004", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0160", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1784", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0557", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1433", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1650", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1332", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1102", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0952", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1950", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0191", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0666", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0710", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0262", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0380", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1485", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0818", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0882", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1690", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0520", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0041", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1276", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0987", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1920", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0573", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1722", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1465", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1405", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0457", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1742", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0579", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0071", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1344", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0208", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1393", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1844", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1022", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0922", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1982", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0355", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0065", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0755", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0670", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0264", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1875", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1011", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1105", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0812", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1625", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1166", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0162", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1054", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1524", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0522", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0139", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1083", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1580", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1820", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1396", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1114", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0082", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0810", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1743", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1163", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0718", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0326", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1715", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0635", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1772", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0363", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1538", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1125", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0288", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0774", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0540", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0830", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1846", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0616", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1501", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0886", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1912", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1825", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0961", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1771", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0193", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0035", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1908", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1994", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1025", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1117", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1918", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0277", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0048", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1183", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1490", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0545", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1151", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0017", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0814", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0339", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0279", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0614", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0825", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0574", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0403", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0056", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1698", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1432", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0342", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1596", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0383", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0485", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0104", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1961", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0928", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0054", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1191", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0413", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0142", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1235", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0266", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1795", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1689", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0198", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0469", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1613", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1360", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1009", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0167", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0834", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0013", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0187", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0863", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1000", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1337", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1085", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1539", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0175", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0901", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1785", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1075", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0726", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1949", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0716", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1900", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1595", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1834", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1068", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0595", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0658", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0096", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0654", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1631", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0896", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1738", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1424", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1148", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1028", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0793", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0064", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1278", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0107", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0626", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0841", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0871", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1456", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0188", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1737", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1420", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0170", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0563", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0734", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0748", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1098", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1153", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0874", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1891", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0053", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1333", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0090", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0032", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0709", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0956", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0565", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0428", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0768", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0125", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1972", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1410", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1320", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1724", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0850", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0653", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0611", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0761", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1127", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0541", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1897", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1794", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1691", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1540", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1178", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1302", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1480", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0385", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0991", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1567", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0819", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0609", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1606", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0739", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1944", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1587", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1973", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0769", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0868", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1815", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0766", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1499", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1999", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1313", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0900", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0133", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1630", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0779", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0195", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0492", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1537", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1840", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1714", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0883", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1419", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0319", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1493", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1697", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1044", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0537", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0256", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1300", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1838", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0459", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1496", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0273", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0073", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0222", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0737", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1435", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0276", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1182", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1687", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0253", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1078", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1431", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1753", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0092", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1876", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1374", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1801", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0203", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1517", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1464", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0259", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0473", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1363", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0024", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0744", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1511", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0806", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1525", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0848", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1150", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1384", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0634", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0558", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1018", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0816", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0937", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1851", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1369", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1349", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0701", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1470", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1447", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1130", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0235", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0299", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1138", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1940", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1736", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0847", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1806", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0149", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1484", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0495", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1039", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0530", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0807", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1242", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1786", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1702", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0475", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1343", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0221", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0384", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1534", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0959", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0521", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1358", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0627", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0836", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1970", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0337", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1505", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0984", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0925", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0909", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1842", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1128", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1355", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1870", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1905", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1636", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0077", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0375", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1479", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1238", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1037", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1059", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1668", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0680", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1297", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1549", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1256", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1266", "language": "PHP", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in PHP?", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0772", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1694", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0314", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1887", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0989", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0012", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1553", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0589", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0293", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1066", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0866", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1986", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0491", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1867", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0638", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0790", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1361", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1121", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1241", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0382", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1502", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0424", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1680", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1962", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0569", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0645", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1006", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1190", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1660", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0633", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1657", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1210", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1139", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0673", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1808", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1468", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0936", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0043", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0636", "language": "PHP", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in PHP?", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0719", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1935", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1726", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0652", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1001", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1764", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1700", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0562", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1004", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0750", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0629", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1605", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1146", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1047", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0391", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1824", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0958", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1817", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0168", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0429", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1046", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1074", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1923", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0216", "language": "PHP", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in PHP?", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0550", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0745", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0969", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1013", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0700", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1137", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1886", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1639", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0738", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1719", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0646", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1778", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1974", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0804", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0564", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0525", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1317", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0879", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0141", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1984", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0930", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1045", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1236", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0752", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0908", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1441", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1497", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0225", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1185", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0870", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1198", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0153", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0121", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1979", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1781", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1260", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1888", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1632", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1323", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0918", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0199", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0227", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0440", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0753", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1969", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0786", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0706", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1527", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1375", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1739", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1071", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1779", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1515", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0159", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1286", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0283", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1765", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0842", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1946", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0404", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0470", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0729", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0698", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0811", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0340", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1818", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0431", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1874", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1928", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0464", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1201", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1403", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1061", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0699", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1855", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1291", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0597", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1223", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0075", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0480", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0402", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1860", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1021", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0494", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1649", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1780", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0600", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0217", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1559", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0163", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1550", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1476", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1608", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1301", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1445", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0728", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1263", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1752", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1281", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1792", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1607", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1026", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1142", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0904", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1651", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1288", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1675", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1967", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1319", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1287", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1747", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0798", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0244", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0539", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0640", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1968", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1804", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1202", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1733", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1526", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1741", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0407", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0949", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0643", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0417", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0578", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1409", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0892", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0086", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0057", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1161", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0662", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1621", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1545", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1073", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0265", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1627", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0887", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0624", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0164", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1041", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0038", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1174", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1878", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1641", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1265", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0318", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1305", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0999", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0955", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0154", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1854", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1082", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1618", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0242", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0263", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1376", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1561", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1612", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1562", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0209", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1449", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0327", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1622", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0446", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1873", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0155", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0247", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1811", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0474", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1233", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1205", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0535", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0062", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0580", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1849", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1760", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0275", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1936", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1701", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1939", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1243", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0192", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1084", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0986", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0185", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1597", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1246", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0667", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0258", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1391", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1992", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1339", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0321", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0880", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1423", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0308", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1244", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1993", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1921", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1601", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0995", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0438", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1489", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0544", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1861", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1401", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1154", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1257", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0681", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0098", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1503", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0095", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0865", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0412", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0588", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1767", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1857", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1483", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1157", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0898", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0549", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1551", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1226", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0767", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1038", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0832", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0307", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1922", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1392", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0348", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1693", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0509", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1593", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1827", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1634", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0501", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0101", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0587", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1230", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1172", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1234", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0838", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0325", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0023", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0603", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1654", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0674", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1892", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1958", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1814", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1568", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0433", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1481", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1769", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1895", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0552", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0021", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1696", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0346", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0118", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0313", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0967", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1110", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0607", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1386", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0664", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1536", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0254", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0251", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0946", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0717", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1365", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0422", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1793", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0354", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1299", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1064", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0390", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1628", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0641", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0820", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1062", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1554", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1140", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1003", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1167", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1768", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0029", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0063", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0329", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0292", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1516", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1042", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0632", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0387", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1195", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0507", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0270", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1168", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0058", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1829", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0161", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0576", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0977", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1745", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0586", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1706", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0702", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0864", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1532", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1007", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1669", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1147", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0889", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0500", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1835", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0924", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1135", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0792", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1727", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1594", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0169", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1240", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0777", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1941", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0881", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1123", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0978", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0037", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1428", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0454", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1034", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0323", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0461", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0393", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1194", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0441", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1381", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0019", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1120", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1901", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1248", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1052", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1981", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1225", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0503", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0795", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0678", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0301", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0207", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1413", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0505", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0888", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1826", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0677", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0079", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0962", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1547", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0637", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1759", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1030", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1070", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1406", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0620", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1705", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1277", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0028", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1671", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0511", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1372", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1104", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0756", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0916", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0031", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1331", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0644", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0237", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0510", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1209", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0257", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0826", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0979", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0466", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1707", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1471", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1955", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0524", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0497", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1452", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1208", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1728", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1440", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1461", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1474", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0660", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0809", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0775", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1444", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0974", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0596", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1896", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0731", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1807", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1429", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0512", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0917", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1588", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1029", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0126", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0414", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0610", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0206", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0347", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0204", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0373", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1357", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1976", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0760", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0105", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1985", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0712", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1796", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0405", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0147", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1933", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1666", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0693", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0675", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1394", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0449", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0406", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1500", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0689", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0504", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1616", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1877", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0184", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0377", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0696", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1229", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0822", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1853", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1057", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0439", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1203", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0895", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1303", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0232", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1170", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0862", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1438", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1200", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1364", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1100", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0468", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0291", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0395", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0119", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1416", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1709", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1227", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0042", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1280", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0571", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0296", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0722", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0370", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0781", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1415", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1872", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1247", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1173", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1652", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0960", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1904", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0780", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0116", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0418", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1610", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0527", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1991", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0435", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1692", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0364", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1952", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1382", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0110", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0690", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1640", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0953", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1828", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0715", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1058", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0487", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1910", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1934", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0517", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0220", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1604", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1051", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0005", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0551", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1304", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0176", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0289", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1080", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0733", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1790", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1951", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1574", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0990", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1112", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0840", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0102", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1858", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1509", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0518", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1734", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1463", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0747", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1761", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0513", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1218", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1293", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1498", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0357", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1063", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0285", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1980", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1315", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1776", "language": "PHP", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in PHP?", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0093", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1735", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1232", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1126", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1586", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1583", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1557", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0602", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0211", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1060", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0943", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0127", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1756", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0099", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0773", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1407", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0684", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1282", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1978", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0045", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1224", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0931", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1352", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0481", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0061", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1356", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0526", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1757", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0813", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1673", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1615", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1898", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1270", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1141", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0776", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1889", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1460", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0020", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0080", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1156", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0803", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1014", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1204", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0436", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1708", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0134", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0215", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1643", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1231", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1324", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1602", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1492", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1273", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0878", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0132", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1342", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0122", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0835", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0763", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1571", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0312", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0727", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1132", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1439", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1043", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1113", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1987", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0612", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1740", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1546", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1035", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0837", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1798", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0372", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1310", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0639", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0714", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1380", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1774", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0269", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0239", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0157", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0944", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1096", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1681", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1635", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0453", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1031", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0317", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1906", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0210", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1077", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1718", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1262", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1495", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1330", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0577", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1116", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0027", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1131", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0721", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0197", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0743", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0556", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1543", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0648", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0661", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1959", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0194", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0376", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1522", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1053", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1289", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1856", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1193", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0100", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0730", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0860", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1155", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1903", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1523", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0335", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1176", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0278", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1893", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0655", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0300", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0120", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0334", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0532", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0036", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1050", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1459", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1937", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1837", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1803", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1748", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0985", "language": "Python", "category": "oop", "instruction": "How do you create an instance of a class in Python?", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0741", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0137", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1010", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1314", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0245", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0059", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0502", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1791", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1573", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0855", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0590", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0255", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0968", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0615", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1930", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1971", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0006", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0055", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0460", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1379", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1012", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1629", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0619", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0087", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1159", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0593", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0782", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0381", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0409", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0281", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0947", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1334", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1590", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0560", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0839", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1787", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0182", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1473", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0136", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1902", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1868", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0973", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0622", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0426", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1789", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1843", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1430", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0849", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0869", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0336", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1924", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0907", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0852", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1348", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0442", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0180", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1164", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1181", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1996", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1954", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1841", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1871", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1213", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0791", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1221", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0876", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1488", "language": "PHP", "category": "web_basics", "instruction": "Write a PHP script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0815", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0740", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1670", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1048", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0651", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1750", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0399", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1398", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1049", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1294", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0913", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1103", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0172", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1279", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0401", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0570", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0455", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1911", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1884", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1346", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1259", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0190", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0732", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1770", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1472", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0823", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0051", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1678", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1848", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1129", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0286", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-2000", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0981", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1521", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0694", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0906", "language": "PHP", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in PHP?", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1158", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0302", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1408", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1713", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1274", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1385", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0679", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1530", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1119", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0009", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0320", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0656", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1658", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1929", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1023", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0829", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1688", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1732", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1942", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1093", "language": "Python", "category": "arrays_lists", "instruction": "Create a Python script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0333", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1325", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0919", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1560", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0303", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0705", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0650", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1777", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1152", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0421", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1830", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1591", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0534", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1799", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1563", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1755", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0649", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1915", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0240", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1964", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0331", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0315", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1988", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0374", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0585", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1909", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0330", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0341", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0934", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0583", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0724", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1366", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0097", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1290", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0762", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0992", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0465", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0533", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0352", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0628", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1275", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1731", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0623", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1455", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0912", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1124", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1938", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1569", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1308", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0669", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1977", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1186", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1703", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1347", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1883", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0476", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0046", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0129", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0388", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0598", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0044", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0910", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0861", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0711", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0971", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0271", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1109", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0854", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0601", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0047", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1067", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0419", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0309", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1017", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0304", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0230", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0566", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1589", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0224", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0158", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0591", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0367", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0801", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1717", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0179", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1457", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0386", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0135", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0754", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1272", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0926", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0599", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1092", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1090", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0963", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0252", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1079", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1027", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0996", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1395", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0708", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0764", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1812", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1467", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1810", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0867", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1032", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0548", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0723", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0657", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0462", "language": "PHP", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in PHP to square a number.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1508", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1189", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1749", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0233", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1531", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1685", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0686", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1370", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0420", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1149", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0138", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1145", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1328", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0359", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0751", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1646", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1585", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1533", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1442", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1720", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1965", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1443", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0106", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1510", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1494", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0113", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1845", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1271", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1821", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0425", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1179", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1111", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1581", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1453", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1617", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0608", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0067", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1916", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1805", "language": "JavaScript", "category": "oop", "instruction": "How do you create an instance of a class in JavaScript?", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0789", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1775", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1544", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0003", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1298", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1528", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1284", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0759", "language": "PHP", "category": "algorithms", "instruction": "Implement a simple linear search in PHP.", "input": "Find 7 in [1, 3, 7, 9]", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1833", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1802", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0284", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0950", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1462", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0050", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1196", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1169", "language": "JavaScript", "category": "algorithms", "instruction": "Write a JavaScript function to check if a string is a palindrome.", "input": "'racecar'", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0941", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1813", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0625", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1371", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0983", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1816", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1721", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1850", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1555", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0606", "language": "PHP", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in PHP?", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1454", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0272", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0447", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0833", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0026", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1144", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0171", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0493", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1015", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0927", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1667", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0982", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the quotient of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0808", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1088", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0872", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0069", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-1033", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0964", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0083", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0091", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0856", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0011", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1175", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1520", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1422", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0456", "language": "PHP", "category": "async", "instruction": "Write an asynchronous function in PHP that waits for 2 seconds.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1662", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0890", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0671", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare different variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0508", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0506", "language": "JavaScript", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in JavaScript?", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0877", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1637", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0572", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0948", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0970", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1995", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0444", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1647", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1069", "language": "Python", "category": "algorithms", "instruction": "Implement a simple linear search in Python.", "input": "Find 7 in [1, 3, 7, 9]", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1556", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0178", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0471", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1133", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1957", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0349", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1253", "language": "JavaScript", "category": "arrays_lists", "instruction": "Create a JavaScript script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1847", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0322", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1998", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0605", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0451", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0704", "language": "JavaScript", "category": "objects_dicts", "instruction": "How do you access a value by key in a JavaScript dictionary/object?", "input": "Key is 'price'.", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0351", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0857", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0940", "language": "Python", "category": "debugging", "instruction": "Find the logical error in this Python loop.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0954", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1832", "language": "JavaScript", "category": "functions", "instruction": "Create a JavaScript function that calculates the sum of two numbers.", "input": "Add 10 and 20.", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1458", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0575", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0123", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1165", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1564", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0066", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0261", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1744", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0415", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0553", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0735", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1582", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0398", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0938", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0280", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0765", "language": "PHP", "category": "oop", "instruction": "Define a simple class 'Car' in PHP with a constructor and one method.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0794", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-1800", "language": "PHP", "category": "debugging", "instruction": "The following PHP code has a syntax error. Fix it.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-0932", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1249", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0443", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0297", "language": "PHP", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in PHP?", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0893", "language": "JavaScript", "category": "arrays_lists", "instruction": "Write JavaScript code to remove the last element from an array/list.", "input": "", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1953", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0993", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1199", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0965", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0151", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1620", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1839", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0410", "language": "JavaScript", "category": "debugging", "instruction": "The following JavaScript code has a syntax error. Fix it.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-0845", "language": "JavaScript", "category": "oop", "instruction": "Show how inheritance works in JavaScript by extending a 'User' class to an 'Admin' class.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-0486", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1869", "language": "PHP", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in PHP up to N terms.", "input": "N = 5", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0467", "language": "JavaScript", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in JavaScript.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1482", "language": "PHP", "category": "functions", "instruction": "Define a function called 'greet' in PHP that takes a name and returns a greeting.", "input": "", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-0226", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0472", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1862", "language": "JavaScript", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in JavaScript to square a number.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-1387", "language": "Python", "category": "error_handling", "instruction": "Write a try/catch block in Python to handle a division by zero error.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0408", "language": "PHP", "category": "web_basics", "instruction": "Create a basic HTML response using PHP.", "input": "", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0859", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0668", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1188", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-1214", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0911", "language": "JavaScript", "category": "syntax", "instruction": "Show the basic structure of a for-loop in JavaScript.", "input": "Loop from 1 to 5.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1478", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0482", "language": "JavaScript", "category": "functions", "instruction": "Define a function called 'greet' in JavaScript that takes a name and returns a greeting.", "input": "", "output": "function add(x, y) {\n return x + y;\n}\n\nconst result = add(10, 20);"} | |
| {"id": "PROG-0146", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1948", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1055", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1983", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0060", "language": "PHP", "category": "debugging", "instruction": "Why is this PHP function returning 'undefined' or 'None'?", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1751", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0361", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1101", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare global variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1947", "language": "PHP", "category": "error_handling", "instruction": "Write a try/catch block in PHP to handle a division by zero error.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0214", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-1513", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-1823", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1264", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0685", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0515", "language": "JavaScript", "category": "oop", "instruction": "Define a simple class 'Car' in JavaScript with a constructor and one method.", "input": "", "output": "// Professional oop example in JavaScript\nconsole.log('Running oop logic...');"} | |
| {"id": "PROG-1926", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-0430", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0584", "language": "JavaScript", "category": "objects_dicts", "instruction": "Merge two JavaScript dictionaries/objects into one.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0746", "language": "JavaScript", "category": "async", "instruction": "Show basic use of async/await in JavaScript.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-1321", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0111", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0089", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1373", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0328", "language": "Python", "category": "web_basics", "instruction": "Create a basic HTML response using Python.", "input": "", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-1710", "language": "PHP", "category": "debugging", "instruction": "Find the logical error in this PHP loop.", "input": "<?php\n echo 'hello'\n?>", "output": "<?php\n// Professional debugging example in PHP\necho 'Running debugging logic...';\n?>"} | |
| {"id": "PROG-1623", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1931", "language": "JavaScript", "category": "syntax", "instruction": "Write a simple JavaScript script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1866", "language": "PHP", "category": "async", "instruction": "Show basic use of async/await in PHP.", "input": "", "output": "<?php\n// Professional async example in PHP\necho 'Running async logic...';\n?>"} | |
| {"id": "PROG-1989", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0231", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0397", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-0109", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1822", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0427", "language": "Python", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in Python?", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1351", "language": "Python", "category": "syntax", "instruction": "Show the basic structure of a for-loop in Python.", "input": "Loop from 1 to 5.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1283", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1945", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1863", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1040", "language": "JavaScript", "category": "debugging", "instruction": "Find the logical error in this JavaScript loop.", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1106", "language": "JavaScript", "category": "async", "instruction": "Write an asynchronous function in JavaScript that waits for 2 seconds.", "input": "", "output": "// Professional async example in JavaScript\nconsole.log('Running async logic...');"} | |
| {"id": "PROG-0742", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1268", "language": "JavaScript", "category": "web_basics", "instruction": "Create a basic HTML response using JavaScript.", "input": "", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0196", "language": "Python", "category": "async", "instruction": "How do you handle multiple concurrent promises/tasks in Python?", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1917", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-0241", "language": "Python", "category": "syntax", "instruction": "Write a simple Python script to declare local variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-0394", "language": "Python", "category": "objects_dicts", "instruction": "Merge two Python dictionaries/objects into one.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0483", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-1143", "language": "PHP", "category": "arrays_lists", "instruction": "Write PHP code to remove the last element from an array/list.", "input": "", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0010", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0858", "language": "PHP", "category": "web_basics", "instruction": "How do you make a simple GET request in PHP?", "input": "URL: 'https://api.example.com'", "output": "<?php\n// Professional web_basics example in PHP\necho 'Running web_basics logic...';\n?>"} | |
| {"id": "PROG-0713", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-0617", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1285", "language": "Python", "category": "oop", "instruction": "Define a simple class 'Car' in Python with a constructor and one method.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0181", "language": "Python", "category": "syntax", "instruction": "How do you write a single-line comment in Python?", "input": "", "output": "a = 5 # Integer\nb = 'Hello' # String\nc = True # Boolean"} | |
| {"id": "PROG-1254", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1677", "language": "PHP", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in PHP.", "input": "", "output": "<?php\n// Professional error_handling example in PHP\necho 'Running error_handling logic...';\n?>"} | |
| {"id": "PROG-1469", "language": "JavaScript", "category": "algorithms", "instruction": "Implement a simple linear search in JavaScript.", "input": "Find 7 in [1, 3, 7, 9]", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-1879", "language": "Python", "category": "algorithms", "instruction": "Write a Python function to check if a string is a palindrome.", "input": "'racecar'", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-1222", "language": "Python", "category": "functions", "instruction": "Define a function called 'greet' in Python that takes a name and returns a greeting.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1763", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1417", "language": "Python", "category": "error_handling", "instruction": "Show how to ensure code runs regardless of an error using finally in Python.", "input": "", "output": "# Professional error_handling example in Python\nprint('Running error_handling logic...')"} | |
| {"id": "PROG-1907", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-1997", "language": "JavaScript", "category": "error_handling", "instruction": "How do you throw/raise a custom exception in JavaScript?", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0490", "language": "Python", "category": "debugging", "instruction": "The following Python code has a syntax error. Fix it.", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-0844", "language": "Python", "category": "objects_dicts", "instruction": "How do you access a value by key in a Python dictionary/object?", "input": "Key is 'price'.", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0923", "language": "JavaScript", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in JavaScript?", "input": "List of fruits.", "output": "// Professional arrays_lists example in JavaScript\nconsole.log('Running arrays_lists logic...');"} | |
| {"id": "PROG-1659", "language": "PHP", "category": "algorithms", "instruction": "Write a PHP function to check if a string is a palindrome.", "input": "'racecar'", "output": "<?php\n// Professional algorithms example in PHP\necho 'Running algorithms logic...';\n?>"} | |
| {"id": "PROG-0555", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1311", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-0294", "language": "PHP", "category": "objects_dicts", "instruction": "Merge two PHP dictionaries/objects into one.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0423", "language": "PHP", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in PHP?", "input": "List of fruits.", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0260", "language": "JavaScript", "category": "debugging", "instruction": "Why is this JavaScript function returning 'undefined' or 'None'?", "input": "function test() {\n console.log('hello'\n}", "output": "// Professional debugging example in JavaScript\nconsole.log('Running debugging logic...');"} | |
| {"id": "PROG-1819", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0975", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1421", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-0853", "language": "Python", "category": "arrays_lists", "instruction": "How do you iterate through an array of strings in Python?", "input": "List of fruits.", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0582", "language": "PHP", "category": "functions", "instruction": "Create a PHP function that calculates the product of two numbers.", "input": "Add 10 and 20.", "output": "function add($x, $y) {\n return $x + $y;\n}\n\n$result = add(10, 20);"} | |
| {"id": "PROG-1216", "language": "Python", "category": "async", "instruction": "Write an asynchronous function in Python that waits for 2 seconds.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-1335", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-1448", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0183", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0368", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0015", "language": "PHP", "category": "oop", "instruction": "Show how inheritance works in PHP by extending a 'User' class to an 'Admin' class.", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0014", "language": "JavaScript", "category": "objects_dicts", "instruction": "Create a JavaScript object/dictionary representing a 'Book' with title and author.", "input": "", "output": "// Professional objects_dicts example in JavaScript\nconsole.log('Running objects_dicts logic...');"} | |
| {"id": "PROG-0166", "language": "Python", "category": "async", "instruction": "Show basic use of async/await in Python.", "input": "", "output": "# Professional async example in Python\nprint('Running async logic...')"} | |
| {"id": "PROG-0998", "language": "JavaScript", "category": "web_basics", "instruction": "Write a JavaScript script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-0033", "language": "PHP", "category": "arrays_lists", "instruction": "Create a PHP script to sort an array of numbers in descending order.", "input": "[5, 2, 9, 1]", "output": "<?php\n// Professional arrays_lists example in PHP\necho 'Running arrays_lists logic...';\n?>"} | |
| {"id": "PROG-0324", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-0771", "language": "PHP", "category": "syntax", "instruction": "Write a simple PHP script to declare constant variables.", "input": "Declare three variables: an integer, a string, and a boolean.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1255", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-1723", "language": "Python", "category": "arrays_lists", "instruction": "Write Python code to remove the last element from an array/list.", "input": "", "output": "# Professional arrays_lists example in Python\nprint('Running arrays_lists logic...')"} | |
| {"id": "PROG-0205", "language": "Python", "category": "oop", "instruction": "Show how inheritance works in Python by extending a 'User' class to an 'Admin' class.", "input": "", "output": "# Professional oop example in Python\nprint('Running oop logic...')"} | |
| {"id": "PROG-0274", "language": "Python", "category": "objects_dicts", "instruction": "Create a Python object/dictionary representing a 'Book' with title and author.", "input": "", "output": "# Professional objects_dicts example in Python\nprint('Running objects_dicts logic...')"} | |
| {"id": "PROG-0084", "language": "PHP", "category": "objects_dicts", "instruction": "How do you access a value by key in a PHP dictionary/object?", "input": "Key is 'price'.", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1192", "language": "Python", "category": "functions", "instruction": "Create a Python function that calculates the difference of two numbers.", "input": "Add 10 and 20.", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-0499", "language": "Python", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in Python up to N terms.", "input": "N = 5", "output": "# Professional algorithms example in Python\nprint('Running algorithms logic...')"} | |
| {"id": "PROG-0899", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0338", "language": "JavaScript", "category": "web_basics", "instruction": "How do you make a simple GET request in JavaScript?", "input": "URL: 'https://api.example.com'", "output": "// Professional web_basics example in JavaScript\nconsole.log('Running web_basics logic...');"} | |
| {"id": "PROG-1134", "language": "PHP", "category": "objects_dicts", "instruction": "Create a PHP object/dictionary representing a 'Book' with title and author.", "input": "", "output": "<?php\n// Professional objects_dicts example in PHP\necho 'Running objects_dicts logic...';\n?>"} | |
| {"id": "PROG-1990", "language": "Python", "category": "debugging", "instruction": "Why is this Python function returning 'undefined' or 'None'?", "input": "def test():\nprint('hello')", "output": "# Professional debugging example in Python\nprint('Running debugging logic...')"} | |
| {"id": "PROG-1427", "language": "JavaScript", "category": "error_handling", "instruction": "Write a try/catch block in JavaScript to handle a division by zero error.", "input": "", "output": "// Professional error_handling example in JavaScript\nconsole.log('Running error_handling logic...');"} | |
| {"id": "PROG-0345", "language": "PHP", "category": "oop", "instruction": "How do you create an instance of a class in PHP?", "input": "", "output": "<?php\n// Professional oop example in PHP\necho 'Running oop logic...';\n?>"} | |
| {"id": "PROG-0851", "language": "JavaScript", "category": "syntax", "instruction": "How do you write a single-line comment in JavaScript?", "input": "", "output": "let a = 5; // Integer\nconst b = 'Hello'; // String\nvar c = true; // Boolean"} | |
| {"id": "PROG-1552", "language": "Python", "category": "functions", "instruction": "Write an anonymous function (lambda/arrow) in Python to square a number.", "input": "", "output": "def add(x, y):\n return x + y\n\nresult = add(10, 20)"} | |
| {"id": "PROG-1648", "language": "Python", "category": "web_basics", "instruction": "How do you make a simple GET request in Python?", "input": "URL: 'https://api.example.com'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |
| {"id": "PROG-0561", "language": "PHP", "category": "syntax", "instruction": "Show the basic structure of a for-loop in PHP.", "input": "Loop from 1 to 5.", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1611", "language": "PHP", "category": "syntax", "instruction": "How do you write a single-line comment in PHP?", "input": "", "output": "<?php\n$a = 5;\n$b = 'Hello';\n$c = true;\n?>"} | |
| {"id": "PROG-1619", "language": "JavaScript", "category": "algorithms", "instruction": "Create a Fibonacci sequence generator in JavaScript up to N terms.", "input": "N = 5", "output": "// Professional algorithms example in JavaScript\nconsole.log('Running algorithms logic...');"} | |
| {"id": "PROG-0688", "language": "Python", "category": "web_basics", "instruction": "Write a Python script to parse a JSON string into an object.", "input": "'{\"name\": \"John\"}'", "output": "# Professional web_basics example in Python\nprint('Running web_basics logic...')"} | |