| {"id": "PROG-0356", "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-1686", "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-1642", "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-1566", "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-0437", "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-0659", "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-0282", "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-1118", "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-1180", "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-1402", "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-0248", "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-0665", "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-0824", "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-1919", "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-1512", "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-0691", "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-0873", "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-1711", "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-1682", "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-0452", "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-1261", "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-1219", "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-1019", "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-0234", "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-1782", "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-0131", "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-1211", "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-0350", "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-1252", "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-0935", "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-1914", "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-1626", "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-0630", "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-0103", "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-1695", "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-0353", "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-0030", "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-0268", "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-1329", "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-1437", "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-0498", "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-0094", "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-1267", "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-0966", "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-0040", "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-1661", "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-1684", "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-0290", "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-1507", "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-1672", "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-0148", "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-0478", "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-1187", "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-1518", "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-0306", "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-1099", "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-1389", "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-0939", "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-1072", "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-1367", "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-1340", "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-1653", "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-0434", "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-0243", "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-0831", "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-0088", "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-1477", "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-1614", "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-1882", "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-0115", "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-0695", "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-0076", "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-0034", "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-0921", "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-1663", "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-1094", "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-1024", "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-0631", "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-1927", "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-1788", "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-1624", "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-0130", "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-0797", "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-1002", "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-0489", "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-1215", "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-1475", "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-0052", "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-1859", "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-0074", "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-0287", "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-0389", "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-1506", "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-0897", "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-1296", "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-0174", "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-0997", "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-1746", "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-1411", "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-1292", "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-0219", "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-1932", "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-1426", "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-0613", "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-0392", "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-1963", "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-0787", "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-0081", "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-1136", "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-0362", "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-0416", "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-1836", "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-0594", "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-1570", "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-1558", "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-0942", "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-0165", "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-0697", "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-1095", "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-0749", "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-0186", "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-1326", "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-1295", "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-0114", "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-0821", "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-0621", "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-1397", "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-0683", "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-0736", "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-1097", "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-1162", "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-0249", "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-0988", "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-1598", "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-1676", "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-1412", "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-0788", "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-0007", "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-0463", "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-1107", "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-0144", "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-1609", "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-1664", "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-1600", "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-1773", "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-1729", "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-0828", "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-0894", "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-0980", "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-1005", "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-1579", "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-1450", "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-1056", "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-0008", "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-1177", "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-1894", "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-0676", "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-1434", "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-0311", "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-0546", "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-0800", "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-1362", "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-0078", "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-0002", "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-1312", "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-1338", "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-0305", "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-1020", "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-0039", "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-1865", "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-1809", "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-0514", "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-1491", "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-1171", "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-0145", "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-0150", "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-0072", "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-0212", "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-0531", "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-1466", "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-0905", "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-0218", "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-1318", "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-1258", "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-0448", "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-0884", "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-1575", "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-1108", "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-0295", "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-0223", "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-1797", "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-1322", "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-0366", "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-0805", "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-1250", "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-0411", "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-1008", "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-0143", "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-0903", "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-0365", "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-0543", "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-1665", "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-0529", "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-0124", "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-0682", "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-0796", "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-0784", "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-0128", "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-1592", "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-0568", "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-0152", "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-1599", "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-0332", "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-0528", "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-0663", "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-1885", "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-1577", "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-1368", "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-1418", "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-0875", "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-1576", "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-0567", "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-0929", "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-1309", "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-0156", "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-1353", "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-0957", "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-0604", "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-0519", "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-0378", "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-1425", "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-0228", "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-0379", "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-1645", "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-1160", "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-1327", "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-1565", "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-1852", "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-0770", "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-0267", "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-1239", "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-1754", "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-0177", "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-0246", "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-1451", "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-0250", "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-1307", "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-1228", "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-0445", "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-1712", "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-1831", "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-1345", "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-1217", "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-0117", "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-0189", "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-1269", "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-0049", "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-0070", "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-0396", "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-0516", "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-0581", "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-1486", "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-0450", "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-0720", "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-0914", "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-1404", "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-0213", "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-1076", "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-0201", "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-0843", "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-1925", "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-0140", "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-1704", "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-0018", "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-1378", "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-0022", "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-1122", "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-0642", "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-0369", "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-1414", "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-1388", "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-0692", "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-1065", "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-0400", "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-1966", "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-1206", "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-1377", "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-1956", "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-0496", "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-1535", "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-1383", "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-1584", "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-0945", "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-0802", "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-1197", "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-1341", "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-0523", "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-0202", "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-1644", "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-0547", "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-0554", "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-0687", "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-0559", "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-1758", "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-1336", "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-1881", "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-1251", "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-0885", "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-1730", "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-0725", "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-1960", "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-1089", "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-1880", "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-0200", "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-0085", "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-1399", "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-1086", "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-0647", "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-1390", "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-0783", "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-0920", "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-1633", "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-1899", "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-0592", "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-0025", "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-0891", "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-1783", "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-1087", "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-1975", "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-0538", "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-0972", "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-0799", "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-1446", "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-1400", "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-0778", "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-0479", "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-1091", "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-1890", "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-1541", "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-1529", "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-1943", "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-0618", "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-0976", "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-0817", "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-0951", "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-0344", "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-0108", "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-0238", "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-1679", "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-1548", "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-0542", "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-1316", "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-0112", "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-0707", "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-1725", "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-1504", "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-1184", "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-0432", "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-0343", "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-1306", "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-1487", "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-0902", "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-1354", "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-0488", "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-0785", "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-1578", "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-0846", "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-1542", "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-1016", "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-1716", "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-0316", "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-1683", "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-1913", "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-1220", "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-0298", "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-0173", "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-0703", "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-0068", "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-1766", "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-1081", "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-1638", "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-0371", "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-0994", "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-0484", "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-1436", "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-1603", "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-0536", "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-0360", "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-1655", "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-0758", "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-0915", "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-1350", "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-0310", "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-1514", "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-1212", "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-1864", "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-0358", "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-1237", "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-0229", "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-1519", "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...')"} | |