messages listlengths 2 2 | instruction stringlengths 14 288 | input stringlengths 0 635 | output stringlengths 1 3.91k |
|---|---|---|---|
[
{
"role": "user",
"content": "Refactor the following code in C++ to incorporate dynamic memory allocation.\n\n#include <stdio.h>\nint main() \n{ \n int a[20]; \n int n = 20;\n for (int i=0; i<n; i++) \n scanf(\"%d\", &a[i]); \n return 0;\n}"
},
{
"role": "assistant",
"content"... | Refactor the following code in C++ to incorporate dynamic memory allocation. | #include <stdio.h>
int main()
{
int a[20];
int n = 20;
for (int i=0; i<n; i++)
scanf("%d", &a[i]);
return 0;
} | #include <stdio.h>
#include <stdlib.h>
int main()
{
int* a;
int n = 20;
a = (int *)malloc(n * sizeof(int));
for (int i=0; i<n; i++)
scanf("%d", &a[i]);
free(a);
return 0;
} |
[
{
"role": "user",
"content": "Find any two numbers in an array such that their sum is equal to a given value.\n\narray = [3, 4, 5, 6, 7, 8]\nvalue = 11"
},
{
"role": "assistant",
"content": "for i in range(len(array)):\n for j in range(i+1, len(array)):\n if array[i] + array[j] == value:\n pr... | Find any two numbers in an array such that their sum is equal to a given value. | array = [3, 4, 5, 6, 7, 8]
value = 11 | for i in range(len(array)):
for j in range(i+1, len(array)):
if array[i] + array[j] == value:
print(array[i], array[j]) |
[
{
"role": "user",
"content": "Design an algorithm that can be used to identify if a given binary tree is a valid BST."
},
{
"role": "assistant",
"content": "def isValidBST(root): \n\t\n\t# Base Case \n\tif root is None: \n\t\treturn True\n\t\t\n\t# Check recursive if left is valid \n\tif not isV... | Design an algorithm that can be used to identify if a given binary tree is a valid BST. | def isValidBST(root):
# Base Case
if root is None:
return True
# Check recursive if left is valid
if not isValidBST(root.left):
return False
# If root's value is smaller than left subtree, not valid
if root.left is not None and root.data < root.left.data:
return False
# Check recursive if rig... | |
[
{
"role": "user",
"content": "Write a function in Python to convert a given decimal number into its binary form."
},
{
"role": "assistant",
"content": "def decimal_to_binary(num):\n binary = []\n\n while num > 0:\n binary.append(num%2)\n num //= 2\n binary.reverse()\n r... | Write a function in Python to convert a given decimal number into its binary form. | def decimal_to_binary(num):
binary = []
while num > 0:
binary.append(num%2)
num //= 2
binary.reverse()
return binary | |
[
{
"role": "user",
"content": "Write an CSS code to hide all red elements from the page."
},
{
"role": "assistant",
"content": "*[style*='red'] {\n display: none;\n}"
}
] | Write an CSS code to hide all red elements from the page. | *[style*='red'] {
display: none;
} | |
[
{
"role": "user",
"content": "Write code to implement a priority queue in Python."
},
{
"role": "assistant",
"content": "class PriorityQueue:\n def __init__(self):\n self.queue = []\n \n # Create the enqueue(data) method to add data inside the queue\n def enqueue(self, data):\n ... | Write code to implement a priority queue in Python. | class PriorityQueue:
def __init__(self):
self.queue = []
# Create the enqueue(data) method to add data inside the queue
def enqueue(self, data):
self.queue.append(data)
# Create the dequeue() method to remove data from the queue
def dequeue(self):
if self.queue:
... | |
[
{
"role": "user",
"content": "Assign a class of 'active' to the last <a> element in the given HTML code.\n\n<div>\n <a href=\"#\">Home</a>\n <a href=\"#\">About</a>\n <a href=\"#\">Contact</a>\n</div>"
},
{
"role": "assistant",
"content": "<div>\n <a href=\"#\">Home</a>\n <a href=... | Assign a class of 'active' to the last <a> element in the given HTML code. | <div>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</div> | <div>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#" class="active">Contact</a>
</div> |
[
{
"role": "user",
"content": "Create a MySQL query that returns a list of states in the United States with populations greater than 10 million."
},
{
"role": "assistant",
"content": "SELECT state\nFROM population_data \nWHERE population > 10000000;"
}
] | Create a MySQL query that returns a list of states in the United States with populations greater than 10 million. | SELECT state
FROM population_data
WHERE population > 10000000; | |
[
{
"role": "user",
"content": "Construct an object in JavaScript to model a car with make, model, year, color, and price as attributes."
},
{
"role": "assistant",
"content": "let car = { \n make:'', \n model:'', \n year:'', \n color:'', \n price:0 \n};"
}
] | Construct an object in JavaScript to model a car with make, model, year, color, and price as attributes. | let car = {
make:'',
model:'',
year:'',
color:'',
price:0
}; | |
[
{
"role": "user",
"content": "Write a C program to implement diamond pattern."
},
{
"role": "assistant",
"content": "#include <stdio.h>\n\nint main()\n{\n int n; //number of rows \n //to be printed \n printf(\"Enter the number of rows\\n\");\n scanf(\"%d\",&n);\n \n // odd... | Write a C program to implement diamond pattern. | #include <stdio.h>
int main()
{
int n; //number of rows
//to be printed
printf("Enter the number of rows\n");
scanf("%d",&n);
// odd number of rows
if(n%2==1)
{
// rows increment
for(int i=0; i<n; i++)
{
// Print spaces
for(... | |
[
{
"role": "user",
"content": "Using regular expressions, extract all telephone numbers from a given string in JavaScript."
},
{
"role": "assistant",
"content": "let string = \"My telephone numbers are 123-456-7890 and 012-345-6789\";\n\nlet regex = /\\d{3}-\\d{3}-\\d{4}/g;\nlet numbers = string.... | Using regular expressions, extract all telephone numbers from a given string in JavaScript. | let string = "My telephone numbers are 123-456-7890 and 012-345-6789";
let regex = /\d{3}-\d{3}-\d{4}/g;
let numbers = string.match(regex);
console.log(numbers); | |
[
{
"role": "user",
"content": "How do we define a class in C++?"
},
{
"role": "assistant",
"content": "In C++, a class is defined by using the keyword \"class\" followed by the class name followed by the body of the class, which is enclosed within a pair of curly braces. Within the body of the cl... | How do we define a class in C++? | In C++, a class is defined by using the keyword "class" followed by the class name followed by the body of the class, which is enclosed within a pair of curly braces. Within the body of the class are the class members, including the data members and member functions.
For example, the following is how we might define a... | |
[
{
"role": "user",
"content": "Create a program that prints out the set of all prime divisors of a given number\n\nnum = 50"
},
{
"role": "assistant",
"content": "primes = []\nfor i in range(2, num+1):\n is_prime = True\n for j in range(2, int(i**0.5)+1):\n if (i % j) == 0:\n ... | Create a program that prints out the set of all prime divisors of a given number | num = 50 | primes = []
for i in range(2, num+1):
is_prime = True
for j in range(2, int(i**0.5)+1):
if (i % j) == 0:
is_prime = False
break
if is_prime:
primes.append(i)
prime_divisors = {i for i in primes if num % i == 0}
print(prime_divisors) |
[
{
"role": "user",
"content": "Edit the Java code to filter out the persons whose age is less than 18.\n\nList<Person> persons = new ArrayList<>();\n\nfor (Person person : persons) {\n System.out.println(person.getName());\n}"
},
{
"role": "assistant",
"content": "List<Person> persons = new Ar... | Edit the Java code to filter out the persons whose age is less than 18. | List<Person> persons = new ArrayList<>();
for (Person person : persons) {
System.out.println(person.getName());
} | List<Person> persons = new ArrayList<>();
for (Person person : persons) {
if (person.getAge() >= 18) {
System.out.println(person.getName());
}
} |
[
{
"role": "user",
"content": "Create a JavaScript program to convert the following date format into MM/DD/YYYY.\n\ndateString = \"October 5, 2020\""
},
{
"role": "assistant",
"content": "let dateString = \"October 5, 2020\";\nlet newDateString = dateString.substring(0, 3) + \"/\" + dateString.su... | Create a JavaScript program to convert the following date format into MM/DD/YYYY. | dateString = "October 5, 2020" | let dateString = "October 5, 2020";
let newDateString = dateString.substring(0, 3) + "/" + dateString.substring(8, 10) + "/" + dateString.substring(11);
console.log(newDateString);
//Output: 10/05/2020 |
[
{
"role": "user",
"content": "Replace all vowels in a given string with the character \"X\" in C++.\n\n\"Hello World!\""
},
{
"role": "assistant",
"content": "#include<iostream>\n#include<string>\n\nusing namespace std; \n \nint main() \n{ \n string s = \"Hello World!\"; \n for (int i=0; s... | Replace all vowels in a given string with the character "X" in C++. | "Hello World!" | #include<iostream>
#include<string>
using namespace std;
int main()
{
string s = "Hello World!";
for (int i=0; s[i]!='\0'; i++)
{
if (s[i] == 'A' || s[i] == 'a'
|| s[i] == 'E' || s[i] == 'e'
|| s[i] == 'I' || s[i] == 'i'
|| s[i] == 'O' || s[i] == 'o'
... |
[
{
"role": "user",
"content": "Write a C program to search an element in an array"
},
{
"role": "assistant",
"content": "#include <stdio.h>\n \nint search(int array[], int n, int x) \n{ \n int i; \n for (i = 0; i < n; i++) \n if (array[i] == x) \n return i; \n return -... | Write a C program to search an element in an array | #include <stdio.h>
int search(int array[], int n, int x)
{
int i;
for (i = 0; i < n; i++)
if (array[i] == x)
return i;
return -1;
}
int main(void)
{
int array[] = { 2, 3, 4, 10, 40 };
int x = 10;
int n = sizeof(array) / sizeof(array[0]);
int result = se... | |
[
{
"role": "user",
"content": "Create an array of four different colors in JavaScript."
},
{
"role": "assistant",
"content": "let colors = [\"red\", \"green\", \"blue\", \"yellow\"];"
}
] | Create an array of four different colors in JavaScript. | let colors = ["red", "green", "blue", "yellow"]; | |
[
{
"role": "user",
"content": "Create a React component to render a table with data from an API.\n\nconst data = [\n {name: 'Alice', age: 28, job: 'engineer'}, \n {name: 'Bob', age: 30, job: 'teacher'},\n {name: 'Charlie', age: 27, job: 'developer'}\n]"
},
{
"role": "assistant",
"content": "im... | Create a React component to render a table with data from an API. | const data = [
{name: 'Alice', age: 28, job: 'engineer'},
{name: 'Bob', age: 30, job: 'teacher'},
{name: 'Charlie', age: 27, job: 'developer'}
] | import React from 'react';
const dataTable = props => {
const { data } = props;
return (
<table>
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>Job</th>
</tr>
</thead>
<tbody>
{ data.map(item => (
<tr>
<td>{item.name}</... |
[
{
"role": "user",
"content": "How do you delete a row from a MySQL table?"
},
{
"role": "assistant",
"content": "To delete a row from a MySQL table, you can use the DELETE statement. The syntax for the statement is as follows:\n\nDELETE FROM tablename\nWHERE condition;\n\nFor example, if you wan... | How do you delete a row from a MySQL table? | To delete a row from a MySQL table, you can use the DELETE statement. The syntax for the statement is as follows:
DELETE FROM tablename
WHERE condition;
For example, if you want to delete all the rows with a score of less than 50 in a table called 'students', you can use the following statement:
DELETE FROM students... | |
[
{
"role": "user",
"content": "Print the Fibonacci sequence up to the 5th element."
},
{
"role": "assistant",
"content": "0, 1, 1, 2, 3"
}
] | Print the Fibonacci sequence up to the 5th element. | 0, 1, 1, 2, 3 | |
[
{
"role": "user",
"content": "What are the similarities between dictionaries and Lists in Python?"
},
{
"role": "assistant",
"content": "Both dictionaries and lists are container data structures in Python which allow for the storage and retrieval of data. They are both mutable, meaning the conte... | What are the similarities between dictionaries and Lists in Python? | Both dictionaries and lists are container data structures in Python which allow for the storage and retrieval of data. They are both mutable, meaning the contents can be updated, changed and manipulated. They also both contain an ordered sequence of elements, allowing for indexing into each one. However, dictionaries u... | |
[
{
"role": "user",
"content": "Develop a program to find the smallest number in a list\n\nlist = [25, 67, 12, 8]"
},
{
"role": "assistant",
"content": "list = [25, 67, 12, 8]\n\ndef find_smallest(list):\n smallest = list[0]\n for number in list:\n if number < smallest:\n s... | Develop a program to find the smallest number in a list | list = [25, 67, 12, 8] | list = [25, 67, 12, 8]
def find_smallest(list):
smallest = list[0]
for number in list:
if number < smallest:
smallest = number
return smallest
print(find_smallest(list)) |
[
{
"role": "user",
"content": "Write a function that takes a string and a key as parameters and encrypts the string with the key."
},
{
"role": "assistant",
"content": "def encrypt(string, key):\n # Create an empty string that will hold the result\n encrypted_string = \"\"\n \n # Loop... | Write a function that takes a string and a key as parameters and encrypts the string with the key. | def encrypt(string, key):
# Create an empty string that will hold the result
encrypted_string = ""
# Loop through the string and encrypt each character
for i in range(len(string)):
char = string[i]
encrypted_char = chr(ord(char) + key)
encrypted_string += encrypted_char
... | |
[
{
"role": "user",
"content": "Create a function in HTML to display a blinking text on the webpage."
},
{
"role": "assistant",
"content": "<script> \nfunction blink() { \n var text = document.getElementById('blink');\n text.style.visibility = (text.style.visibility == 'hidden' ? '' : 'hidde... | Create a function in HTML to display a blinking text on the webpage. | <script>
function blink() {
var text = document.getElementById('blink');
text.style.visibility = (text.style.visibility == 'hidden' ? '' : 'hidden');
setTimeout("blink()", 500);
}
blink();
</script>
<span id="blink">Text to blink</span> | |
[
{
"role": "user",
"content": "Construct a necessary SQL query to update the name attribute in the User table.\n\nUser table \n| id | name |\n|----|--------|\n| 1 | Johnny | \n\nName to be updated: Daniel"
},
{
"role": "assistant",
"content": "UPDATE User\nSET name = 'Daniel' \nWHERE id = 1;"
... | Construct a necessary SQL query to update the name attribute in the User table. | User table
| id | name |
|----|--------|
| 1 | Johnny |
Name to be updated: Daniel | UPDATE User
SET name = 'Daniel'
WHERE id = 1; |
[
{
"role": "user",
"content": "Write a code snippet to add two numbers provided in two lists.\n\nlist1 = [2, 4, 3]\nlist2 = [5, 6, 4]"
},
{
"role": "assistant",
"content": "new_list = []\n \nfor i in range(len(list1)):\n new_list.append(list1[i] + list2[i])\n \nprint(new_list) # Output: [7, 10... | Write a code snippet to add two numbers provided in two lists. | list1 = [2, 4, 3]
list2 = [5, 6, 4] | new_list = []
for i in range(len(list1)):
new_list.append(list1[i] + list2[i])
print(new_list) # Output: [7, 10, 7] |
[
{
"role": "user",
"content": "Create a dictionary of items with the corresponding price in Python.\n\nitems = ['book', 'pen', 'chair']\nprices = [10, 2, 5]"
},
{
"role": "assistant",
"content": "prices_dict = dict(zip(items, prices))\n# prices_dict = {'book': 10, 'pen': 2, 'chair': 5}"
}
] | Create a dictionary of items with the corresponding price in Python. | items = ['book', 'pen', 'chair']
prices = [10, 2, 5] | prices_dict = dict(zip(items, prices))
# prices_dict = {'book': 10, 'pen': 2, 'chair': 5} |
[
{
"role": "user",
"content": "Create a CSS rule to apply the 'medium-blue' class the the <body> tag."
},
{
"role": "assistant",
"content": "body {\n background-color: medium-blue;\n}"
}
] | Create a CSS rule to apply the 'medium-blue' class the the <body> tag. | body {
background-color: medium-blue;
} | |
[
{
"role": "user",
"content": "Write Java code to check if two strings are anagrams, e.g. god, dog are anagrams.\n\nString str1 = \"abc\";\nString str2 = \"cba\";"
},
{
"role": "assistant",
"content": "public static boolean isAnagram(String str1, String str2) \n{ \n char arr1[] = str1.toCharAr... | Write Java code to check if two strings are anagrams, e.g. god, dog are anagrams. | String str1 = "abc";
String str2 = "cba"; | public static boolean isAnagram(String str1, String str2)
{
char arr1[] = str1.toCharArray();
char arr2[] = str2.toCharArray();
Arrays.sort(arr1);
Arrays.sort(arr2);
return Arrays.equals(arr1, arr2);
} |
[
{
"role": "user",
"content": "Write a loop to iterate over a string and print each character on a new line.\n\ntext = \"Hello world!\""
},
{
"role": "assistant",
"content": "for char in text: \n print(char)"
}
] | Write a loop to iterate over a string and print each character on a new line. | text = "Hello world!" | for char in text:
print(char) |
[
{
"role": "user",
"content": "Format the following string using the str.format() method.\n\nString: The name of the person is {} and his age is {}"
},
{
"role": "assistant",
"content": "print(\"The name of the person is {name} and his age is {age}\".format(name=\"John Doe\", age=23))"
}
] | Format the following string using the str.format() method. | String: The name of the person is {} and his age is {} | print("The name of the person is {name} and his age is {age}".format(name="John Doe", age=23)) |
[
{
"role": "user",
"content": "Program a function that takes a list of numbers as an argument, then returns a dictionary which contains the number in the list as a key and its square root as the value.\n\n[4, 9, 16, 25]"
},
{
"role": "assistant",
"content": "{4: 2, 9: 3, 16: 4, 25: 5}"
}
] | Program a function that takes a list of numbers as an argument, then returns a dictionary which contains the number in the list as a key and its square root as the value. | [4, 9, 16, 25] | {4: 2, 9: 3, 16: 4, 25: 5} |
[
{
"role": "user",
"content": "Select the best approach to process large amount of data in parallel."
},
{
"role": "assistant",
"content": "Using MapReduce."
}
] | Select the best approach to process large amount of data in parallel. | Using MapReduce. | |
[
{
"role": "user",
"content": "Implement a sorting algorithm which takes an array of integers as input and sorts it in ascending order.\n\n[34, 19, 42, -9, 2018, 0, 105]"
},
{
"role": "assistant",
"content": "def sorting_algorithm(arr):\n for i in range(len(arr)-1):\n for j in range(i+1... | Implement a sorting algorithm which takes an array of integers as input and sorts it in ascending order. | [34, 19, 42, -9, 2018, 0, 105] | def sorting_algorithm(arr):
for i in range(len(arr)-1):
for j in range(i+1, len(arr)):
if arr[i] > arr[j]:
arr[i], arr[j] = arr[j], arr[i]
return arr
# Test
arr = [34, 19, 42, -9, 2018, 0, 105]
print(sorting_algorithm(arr)) # [-9, 0, 19, 34, 42, 105, 2018] |
[
{
"role": "user",
"content": "Create an HTML document with a table containing book information."
},
{
"role": "assistant",
"content": "<html>\n <body>\n <h2>Book Information</h2>\n <table>\n <tr>\n <th>Title</th>\n <th>Author</th>\n <th>Price</th>\n </tr>\n ... | Create an HTML document with a table containing book information. | <html>
<body>
<h2>Book Information</h2>
<table>
<tr>
<th>Title</th>
<th>Author</th>
<th>Price</th>
</tr>
<tr>
<td>Harry Potter and the Sorcerer's Stone</td>
<td>J.K. Rowling</td>
<td>$10.99</td>
</tr>
<tr>
<td>The Cat in the... | |
[
{
"role": "user",
"content": "Describe the concept of text mining."
},
{
"role": "assistant",
"content": "Text mining is the process of extracting valuable information from textual data, typically through the application of natural language processing and machine learning algorithms. Text mining... | Describe the concept of text mining. | Text mining is the process of extracting valuable information from textual data, typically through the application of natural language processing and machine learning algorithms. Text mining can identify hidden patterns and relationships in text, including key words, topics, and complex themes, by analyzing sentence st... | |
[
{
"role": "user",
"content": "Convert the following SPARQL query to a SQL query.\n\nSELECT ?person ?age\nWHERE {\n ?person rdf:type ex:Person .\n ?person ex:age ?age\n}"
},
{
"role": "assistant",
"content": "SELECT person, age\nFROM rdf\nWHERE type = 'ex:Person' \nAND predicate = 'ex:age';... | Convert the following SPARQL query to a SQL query. | SELECT ?person ?age
WHERE {
?person rdf:type ex:Person .
?person ex:age ?age
} | SELECT person, age
FROM rdf
WHERE type = 'ex:Person'
AND predicate = 'ex:age'; |
[
{
"role": "user",
"content": "Create a HTML page with a textbox, button and a message “Hello World!”"
},
{
"role": "assistant",
"content": "<html>\n <head></head>\n <body>\n <input type=\"text\" id=\"textbox\">\n <button onclick=\"sayHello()\">Say Hello</button>\n <p i... | Create a HTML page with a textbox, button and a message “Hello World!” | <html>
<head></head>
<body>
<input type="text" id="textbox">
<button onclick="sayHello()">Say Hello</button>
<p id="message">Hello World!</p>
<script>
function sayHello() {
var text = document.getElementById('textbox').value;
d... | |
[
{
"role": "user",
"content": "Design a code to divide two integers without using division operator.\n\n38, 4"
},
{
"role": "assistant",
"content": "def divide_without_operator(x, y):\n if x == 0:\n return 0 \n \n sign = 1\n if x * y < 0:\n sign = -1\n \n x = abs(x) \n... | Design a code to divide two integers without using division operator. | 38, 4 | def divide_without_operator(x, y):
if x == 0:
return 0
sign = 1
if x * y < 0:
sign = -1
x = abs(x)
y = abs(y)
result = 0
while (x >= y):
temp = y
i = 1
while (x >= temp):
x -= temp
result += i
... |
[
{
"role": "user",
"content": "Use the re module in Python to extract the numbers from a given string.\n\nInput string: “There are 9 dogs and 8 cats here”"
},
{
"role": "assistant",
"content": "import re\n\ninput_string = \"There are 9 dogs and 8 cats here\"\n\n# Get the numbers from the string\n... | Use the re module in Python to extract the numbers from a given string. | Input string: “There are 9 dogs and 8 cats here” | import re
input_string = "There are 9 dogs and 8 cats here"
# Get the numbers from the string
numbers = re.findall('\d+', input_string)
print(numbers)
# Output ['9', '8'] |
[
{
"role": "user",
"content": "Write a MySQL query to select all customers who have a birthday in the month of May."
},
{
"role": "assistant",
"content": "SELECT * FROM customers WHERE MONTH(birth_date) = 5;"
}
] | Write a MySQL query to select all customers who have a birthday in the month of May. | SELECT * FROM customers WHERE MONTH(birth_date) = 5; | |
[
{
"role": "user",
"content": "Create a SQL query to show all employee details with their attachments in a specific department.\n\nDepartment Name: Sales"
},
{
"role": "assistant",
"content": "SELECT e.name, a.file_name, a.file_url\nFROM employees e\nJOIN attachments a ON e.id = a.employee_id\nWH... | Create a SQL query to show all employee details with their attachments in a specific department. | Department Name: Sales | SELECT e.name, a.file_name, a.file_url
FROM employees e
JOIN attachments a ON e.id = a.employee_id
WHERE e.department = 'Sales' |
[
{
"role": "user",
"content": "Edit the code to make the string word_list case-insensitive.\n\nword_list = [\"cat\", \"dog\", \"bird\"]"
},
{
"role": "assistant",
"content": "\"\"\"\nEdit the code to make the string word_list case-insensitive\n\"\"\"\n\nword_list = [\"cat\", \"dog\", \"bird\"]\n\... | Edit the code to make the string word_list case-insensitive. | word_list = ["cat", "dog", "bird"] | """
Edit the code to make the string word_list case-insensitive
"""
word_list = ["cat", "dog", "bird"]
# Make the string case-insensitive
word_list = [word.lower() for word in word_list]
print(word_list)
"""
Output: ['cat', 'dog', 'bird']
""" |
[
{
"role": "user",
"content": "Given the following list, create a Python dictionary having the ID as the key and the full name as the value.\n\nmy_list = [('John', '1'), ('Alice', '2'), ('Bob', '3')]"
},
{
"role": "assistant",
"content": "my_dict = dict(my_list)\nprint(my_dict)\n# Output: {'John'... | Given the following list, create a Python dictionary having the ID as the key and the full name as the value. | my_list = [('John', '1'), ('Alice', '2'), ('Bob', '3')] | my_dict = dict(my_list)
print(my_dict)
# Output: {'John': '1', 'Alice': '2', 'Bob': '3'} |
[
{
"role": "user",
"content": "Write a Python program that takes a string entered by the user, reverses it and displays the reversed version of the string."
},
{
"role": "assistant",
"content": "def reverse_string(s): \n return s[::-1]\n \ninput_string = input(\"Enter a string: \")\n \nrever... | Write a Python program that takes a string entered by the user, reverses it and displays the reversed version of the string. | def reverse_string(s):
return s[::-1]
input_string = input("Enter a string: ")
reversed_string = reverse_string(input_string)
print("The reversed string is:", reversed_string) | |
[
{
"role": "user",
"content": "Generate a random hexadecimal string of length 16."
},
{
"role": "assistant",
"content": "8b5f5d45ab80fa9e"
}
] | Generate a random hexadecimal string of length 16. | 8b5f5d45ab80fa9e | |
[
{
"role": "user",
"content": "Suggest a solution to convert a given number from one base to another."
},
{
"role": "assistant",
"content": "def base_conversion(num, base_from, base_to):\n if base_from == 10:\n num = int(num, base_to)\n elif base_to == 10:\n num = int(str(num), base_from)\n els... | Suggest a solution to convert a given number from one base to another. | def base_conversion(num, base_from, base_to):
if base_from == 10:
num = int(num, base_to)
elif base_to == 10:
num = int(str(num), base_from)
else:
num = int(str(int(str(num), base_from)), base_to)
return num | |
[
{
"role": "user",
"content": "Create a for loop for printing \"Hello World N times\", where N is a given number\n\nN = 5"
},
{
"role": "assistant",
"content": "for i in range(N):\n print(\"Hello World\")"
}
] | Create a for loop for printing "Hello World N times", where N is a given number | N = 5 | for i in range(N):
print("Hello World") |
[
{
"role": "user",
"content": "Write a Java code snippet to create an array of integers of length 5."
},
{
"role": "assistant",
"content": "int[] intArray = new int[5];"
}
] | Write a Java code snippet to create an array of integers of length 5. | int[] intArray = new int[5]; | |
[
{
"role": "user",
"content": "Create a basic HTML page with a <title> tag and a <h1> tag."
},
{
"role": "assistant",
"content": "<!DOCTYPE html>\n<html>\n<head>\n <title>Create a basic HTML page</title>\n</head>\n<body>\n <h1>Hello, World!</h1>\n</body>\n</html>"
}
] | Create a basic HTML page with a <title> tag and a <h1> tag. | <!DOCTYPE html>
<html>
<head>
<title>Create a basic HTML page</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html> | |
[
{
"role": "user",
"content": "Generate a JSON response from the following Java object.\n\nUser user = new User(\"jane\", \"doe\", \"jane.doe@gmail.com\");"
},
{
"role": "assistant",
"content": "{\n \"firstName\": \"jane\",\n \"lastName\": \"doe\",\n \"email\": \"jane.doe@gmail.com\"\n}"... | Generate a JSON response from the following Java object. | User user = new User("jane", "doe", "jane.doe@gmail.com"); | {
"firstName": "jane",
"lastName": "doe",
"email": "jane.doe@gmail.com"
} |
[
{
"role": "user",
"content": "Generate a list of valid HTML tags used to structure content in a page."
},
{
"role": "assistant",
"content": "- <html>\n- <title>\n- <head>\n- <body>\n- <header>\n- <nav>\n- <main>\n- <article>\n- <section>\n- <aside>\n- <footer>\n- <h1>, <h2>, <h3>, ... <h6>\n- <p... | Generate a list of valid HTML tags used to structure content in a page. | - <html>
- <title>
- <head>
- <body>
- <header>
- <nav>
- <main>
- <article>
- <section>
- <aside>
- <footer>
- <h1>, <h2>, <h3>, ... <h6>
- <p>
- <ul>, <ol>
- <li>
- <div>
- <span>
- <img>
- <table>
- <tr>, <th>, <td> | |
[
{
"role": "user",
"content": "Write a script in JavaScript to calculate the average temperature from a given array of temperatures."
},
{
"role": "assistant",
"content": "function calculateAverage(temps) {\n let total = 0;\n temps.forEach(temp => {\n total += temp;\n });\n ret... | Write a script in JavaScript to calculate the average temperature from a given array of temperatures. | function calculateAverage(temps) {
let total = 0;
temps.forEach(temp => {
total += temp;
});
return total / temps.length;
} | |
[
{
"role": "user",
"content": "Create an SQL query that returns the top five most expensive items in the table."
},
{
"role": "assistant",
"content": "SELECT ItemName, Price \nFROM Items \nORDER BY Price DESC \nLIMIT 5;"
}
] | Create an SQL query that returns the top five most expensive items in the table. | SELECT ItemName, Price
FROM Items
ORDER BY Price DESC
LIMIT 5; | |
[
{
"role": "user",
"content": "Create a JavaScript object called 'book' with the following properties - title, author, genre, and number of pages."
},
{
"role": "assistant",
"content": "let book = {\n title: \"The Great Gatsby\",\n author: \"F.Scott Fitzgerald\",\n genre: \"Novel\",\n pages: 180\... | Create a JavaScript object called 'book' with the following properties - title, author, genre, and number of pages. | let book = {
title: "The Great Gatsby",
author: "F.Scott Fitzgerald",
genre: "Novel",
pages: 180
}; | |
[
{
"role": "user",
"content": "Construct a class which inherits from the parent class by implementing the abstract method.\n\nclass Parent:\n def __init__(self):\n pass\n \n def parent_func(self):\n print('Parent Function')\n \nclass Child(Parent):\n # TODO: implement abstract method"
},
{
... | Construct a class which inherits from the parent class by implementing the abstract method. | class Parent:
def __init__(self):
pass
def parent_func(self):
print('Parent Function')
class Child(Parent):
# TODO: implement abstract method | class Parent:
def __init__(self):
pass
def parent_func(self):
print('Parent Function')
class Child(Parent):
def abstract_method(self):
pass |
[
{
"role": "user",
"content": "Rewrite the following PHP code to add a new item to the array.\n\n$my_array = array('apple', 'orange');"
},
{
"role": "assistant",
"content": "$my_array = array('apple', 'orange', 'banana');"
}
] | Rewrite the following PHP code to add a new item to the array. | $my_array = array('apple', 'orange'); | $my_array = array('apple', 'orange', 'banana'); |
[
{
"role": "user",
"content": "Enter the necessary code to initiate a MongoDB connection"
},
{
"role": "assistant",
"content": "from pymongo import MongoClient\n\n#creating the MongoClient\nclient = MongoClient(\"mongodb://localhost:27017/\")\n\n#connecting to the database\ndb = client[\"database... | Enter the necessary code to initiate a MongoDB connection | from pymongo import MongoClient
#creating the MongoClient
client = MongoClient("mongodb://localhost:27017/")
#connecting to the database
db = client["database_name"] | |
[
{
"role": "user",
"content": "Create a for-loop in Python that iterates through a list of numbers and prints out only the numbers in the list that are divisible by 5.\n\nmyList = [10,11,20,21,30,31,40]"
},
{
"role": "assistant",
"content": "for i in myList:\n if i % 5 == 0:\n print(i)"... | Create a for-loop in Python that iterates through a list of numbers and prints out only the numbers in the list that are divisible by 5. | myList = [10,11,20,21,30,31,40] | for i in myList:
if i % 5 == 0:
print(i) |
[
{
"role": "user",
"content": "Assign ``num = 5`` to the ``num`` variable using the Python assignment operator."
},
{
"role": "assistant",
"content": "num = 5"
}
] | Assign ``num = 5`` to the ``num`` variable using the Python assignment operator. | num = 5 | |
[
{
"role": "user",
"content": "Generate a python statement to print out \"Hello World\"."
},
{
"role": "assistant",
"content": "print(\"Hello World\")"
}
] | Generate a python statement to print out "Hello World". | print("Hello World") | |
[
{
"role": "user",
"content": "Compose an R expression to determine the median of a vector"
},
{
"role": "assistant",
"content": "median(x)"
}
] | Compose an R expression to determine the median of a vector | median(x) | |
[
{
"role": "user",
"content": "Create an SQL query that finds the total number of customers in the \"Customers\" table."
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM Customers;"
}
] | Create an SQL query that finds the total number of customers in the "Customers" table. | SELECT COUNT(*) FROM Customers; | |
[
{
"role": "user",
"content": "Write a code in Python to toggle all characters in a string.\n\nThe string is: \"Hello World!\""
},
{
"role": "assistant",
"content": "s = \"Hello World!\" \nres = \"\" \nfor char in s: \n if char.islower():\n res += char.upper() \n elif char.isupper():... | Write a code in Python to toggle all characters in a string. | The string is: "Hello World!" | s = "Hello World!"
res = ""
for char in s:
if char.islower():
res += char.upper()
elif char.isupper():
res += char.lower()
print(res) |
[
{
"role": "user",
"content": "Write a multi-line comment in Python describing what the following program does.\n\ndef hello():\n print(\"Hello World\")"
},
{
"role": "assistant",
"content": "\"\"\"\nThis program prints \"Hello World\" when executed. \nIt defines a function called \"hello\" th... | Write a multi-line comment in Python describing what the following program does. | def hello():
print("Hello World") | """
This program prints "Hello World" when executed.
It defines a function called "hello" that does not take any parameters
and simply prints out "Hello World" when it is called.
""" |
[
{
"role": "user",
"content": "Create a function in Python for reversing a list.\n\nmy_list = [1,2,3,4,5]"
},
{
"role": "assistant",
"content": "def reverse_list (my_list):\n return my_list[::-1]\n \nreverse_list(my_list)"
}
] | Create a function in Python for reversing a list. | my_list = [1,2,3,4,5] | def reverse_list (my_list):
return my_list[::-1]
reverse_list(my_list) |
[
{
"role": "user",
"content": "Generate a list of 10 random numbers between 0 and 500 in Python."
},
{
"role": "assistant",
"content": "import random\nnumbers = [random.randint(0,500) for i in range(10)]\nprint(numbers)"
}
] | Generate a list of 10 random numbers between 0 and 500 in Python. | import random
numbers = [random.randint(0,500) for i in range(10)]
print(numbers) | |
[
{
"role": "user",
"content": "Find the number of words in a given sentence using a Python function.\n\nsentence = \"This is a test sentence\""
},
{
"role": "assistant",
"content": "def word_count(sentence):\n return len(sentence.split())"
}
] | Find the number of words in a given sentence using a Python function. | sentence = "This is a test sentence" | def word_count(sentence):
return len(sentence.split()) |
[
{
"role": "user",
"content": "Create an HTML div with an ID of \"main\" and a class of \"container\"."
},
{
"role": "assistant",
"content": "<div id=\"main\" class=\"container\"></div>"
}
] | Create an HTML div with an ID of "main" and a class of "container". | <div id="main" class="container"></div> | |
[
{
"role": "user",
"content": "Compare the performance of Grover's algorithm and classical search algorithms."
},
{
"role": "assistant",
"content": "Grover's algorithm is a quantum algorithm that offers exponential speedup over classical search algorithms. As an example of how it works, assume we... | Compare the performance of Grover's algorithm and classical search algorithms. | Grover's algorithm is a quantum algorithm that offers exponential speedup over classical search algorithms. As an example of how it works, assume we want to find an element in a database of size N. For a classical algorithm, the best search time is O(log N). In contrast, Grover's algorithm provides a search time of onl... | |
[
{
"role": "user",
"content": "Generate a list of 10 random capital letters."
},
{
"role": "assistant",
"content": "['X', 'Z', 'J', 'G', 'M', 'B', 'Y', 'Q', 'C', 'T']"
}
] | Generate a list of 10 random capital letters. | ['X', 'Z', 'J', 'G', 'M', 'B', 'Y', 'Q', 'C', 'T'] | |
[
{
"role": "user",
"content": "What is wrong with this code?\n\nstr1 = 'This is a string'\nstr2 = str1\nstr2 += ' with a suffix'"
},
{
"role": "assistant",
"content": "The variable str1 is not updated and remains as 'This is a string' when you add a suffix to str2. This means that the values of s... | What is wrong with this code? | str1 = 'This is a string'
str2 = str1
str2 += ' with a suffix' | The variable str1 is not updated and remains as 'This is a string' when you add a suffix to str2. This means that the values of str1 and str2 are no longer the same. |
[
{
"role": "user",
"content": "Parse this string to extract the integer value.\n\nvalue = 'The integer value is 12'"
},
{
"role": "assistant",
"content": "import re\nvalue = 'The integer value is 12'\n \nm = re.search(r'\\d+', value)\nprint(int(m.group(0)))"
}
] | Parse this string to extract the integer value. | value = 'The integer value is 12' | import re
value = 'The integer value is 12'
m = re.search(r'\d+', value)
print(int(m.group(0))) |
[
{
"role": "user",
"content": "Implement a function to generate the Fibonacci series upto 'n' terms.\n\nn = 10"
},
{
"role": "assistant",
"content": "def Fibonacci(n): \n a = 0\n b = 1\n if n < 0: \n print(\"Incorrect input\") \n elif n == 0: \n return a \n elif n == ... | Implement a function to generate the Fibonacci series upto 'n' terms. | n = 10 | def Fibonacci(n):
a = 0
b = 1
if n < 0:
print("Incorrect input")
elif n == 0:
return a
elif n == 1:
return b
else:
for i in range(2,n):
c = a + b
a = b
b = c
return b |
[
{
"role": "user",
"content": "Create a for loop in Python that iterates over every element in a list named 'nums'.\n\nnums = [1, 4, 6, 8, 10]"
},
{
"role": "assistant",
"content": "for num in nums:\n # Do something with num"
}
] | Create a for loop in Python that iterates over every element in a list named 'nums'. | nums = [1, 4, 6, 8, 10] | for num in nums:
# Do something with num |
[
{
"role": "user",
"content": "Suggest a class name for a class which models a data structure for storing a 2-dimensional array."
},
{
"role": "assistant",
"content": "MatrixDataStructure"
}
] | Suggest a class name for a class which models a data structure for storing a 2-dimensional array. | MatrixDataStructure | |
[
{
"role": "user",
"content": "Split the following string into a list of words.\n\nstring = \"this is a string\""
},
{
"role": "assistant",
"content": "words = string.split(' ')"
}
] | Split the following string into a list of words. | string = "this is a string" | words = string.split(' ') |
[
{
"role": "user",
"content": "Edit the sentence using the correct punctuation.\n\nThe apple is red"
},
{
"role": "assistant",
"content": "The apple is red."
}
] | Edit the sentence using the correct punctuation. | The apple is red | The apple is red. |
[
{
"role": "user",
"content": "Given an array with n numbers, write a function to find if there exists three elements in the array whose sum is equal to a given number.\n\narray = [5, 3, 1, 8], number = 14"
},
{
"role": "assistant",
"content": "def sum_three_elements(array, number):\n \"\"\"Gi... | Given an array with n numbers, write a function to find if there exists three elements in the array whose sum is equal to a given number. | array = [5, 3, 1, 8], number = 14 | def sum_three_elements(array, number):
"""Given an array with n numbers, find if there exists three elements in the array whose sum is equal to a given number."""
array.sort()
for i in range(len(array) - 2):
left = i + 1
right = len(array) - 1
while left < right:
temp = a... |
[
{
"role": "user",
"content": "Write a C program to print all numbers between 1 to 100 with the exception of those divisible by 3."
},
{
"role": "assistant",
"content": "#include <stdio.h>\n\nint main(void) {\n for (int i=1; i<=100; i++) {\n if (i % 3 != 0) \n printf(\"%d \", i);\n }\n ... | Write a C program to print all numbers between 1 to 100 with the exception of those divisible by 3. | #include <stdio.h>
int main(void) {
for (int i=1; i<=100; i++) {
if (i % 3 != 0)
printf("%d ", i);
}
printf("\n");
return 0;
} | |
[
{
"role": "user",
"content": "Format the given list of numbers in such a way that element at i'th index is the product of all elements in the list except the i'th element.\n\nnumbers = [1, 2, 3, 4]"
},
{
"role": "assistant",
"content": "def format_list(numbers):\n result = []\n prod = 1\n ... | Format the given list of numbers in such a way that element at i'th index is the product of all elements in the list except the i'th element. | numbers = [1, 2, 3, 4] | def format_list(numbers):
result = []
prod = 1
for i in range(0, len(numbers)):
prod = prod * numbers[i]
for i in range(0, len(numbers)):
result.append(prod // numbers[i])
return result |
[
{
"role": "user",
"content": "Write a class in C++ to represent a person with their name and age."
},
{
"role": "assistant",
"content": "class Person {\n private:\n string name;\n int age;\n public:\n Person(string n, int a) {\n name = n;\n age = ... | Write a class in C++ to represent a person with their name and age. | class Person {
private:
string name;
int age;
public:
Person(string n, int a) {
name = n;
age = a;
}
string getName() {
return name;
}
int getAge() {
return age;
}
}; | |
[
{
"role": "user",
"content": "Create a SQL statement that updates a table called 'students' with a new entry.\n\nname = \"John Doe\"\nage = 21"
},
{
"role": "assistant",
"content": "INSERT INTO students (name, age) VALUES (\"John Doe\", 21);"
}
] | Create a SQL statement that updates a table called 'students' with a new entry. | name = "John Doe"
age = 21 | INSERT INTO students (name, age) VALUES ("John Doe", 21); |
[
{
"role": "user",
"content": "Write a permutation function which takes a given string and returns all the possible permutations.\n\n\"abc\""
},
{
"role": "assistant",
"content": "function permutate(str){\n if (str.length <= 1) {\n return str;\n } \n let permutations = []; \n for (let i = ... | Write a permutation function which takes a given string and returns all the possible permutations. | "abc" | function permutate(str){
if (str.length <= 1) {
return str;
}
let permutations = [];
for (let i = 0; i < str.length; i++) {
let char = str[i];
// excluding the character from the string
let remainingString = str.slice(0, i) + str.slice(i + 1, str.length);
// recursively call the function
... |
[
{
"role": "user",
"content": "What is the type of the value of the following expression: 4* 4 + 8"
},
{
"role": "assistant",
"content": "Integer."
}
] | What is the type of the value of the following expression: 4* 4 + 8 | Integer. | |
[
{
"role": "user",
"content": "Write a Python function that takes an array of strings as an argument and returns a boolean."
},
{
"role": "assistant",
"content": "def check_array(arr):\n if len(arr) == 0:\n return False\n\n for str in arr:\n if len(str) == 0:\n return False\n \n r... | Write a Python function that takes an array of strings as an argument and returns a boolean. | def check_array(arr):
if len(arr) == 0:
return False
for str in arr:
if len(str) == 0:
return False
return True | |
[
{
"role": "user",
"content": "Write a C++ code to find the greatest common divisor of two integers"
},
{
"role": "assistant",
"content": "#include<iostream>\n\nusing namespace std;\n\nint gcd(int first, int second) {\n // Base case\n if (second == 0)\n return first;\n \n retur... | Write a C++ code to find the greatest common divisor of two integers | #include<iostream>
using namespace std;
int gcd(int first, int second) {
// Base case
if (second == 0)
return first;
return gcd(second, first % second);
}
int main() {
// Define two integers
int first = 10;
int second = 20;
cout << "The greatest common divisor of " << fi... | |
[
{
"role": "user",
"content": "Define a function that takes in two numbers, and calculates the power of the first number raised to the power of the second number.\n\nbase = 3\nexponent = 4"
},
{
"role": "assistant",
"content": "def power_calc(base, exponent):\n return base ** exponent"
}
] | Define a function that takes in two numbers, and calculates the power of the first number raised to the power of the second number. | base = 3
exponent = 4 | def power_calc(base, exponent):
return base ** exponent |
[
{
"role": "user",
"content": "Write a CSS rule to center a container with class \"main\"."
},
{
"role": "assistant",
"content": ".main {\n margin: 0 auto;\n width: 100%;\n display: block;\n text-align: center;\n}"
}
] | Write a CSS rule to center a container with class "main". | .main {
margin: 0 auto;
width: 100%;
display: block;
text-align: center;
} | |
[
{
"role": "user",
"content": "Parse the following HTML code to get all the hyperlinks in the page.\n\n<a href=\"https://example.com/about\">About</a>\n<a href=\"https://example.com/products\">Products</a>"
},
{
"role": "assistant",
"content": "import re\n\nhtml_code = '''\n<a href=\"https://exam... | Parse the following HTML code to get all the hyperlinks in the page. | <a href="https://example.com/about">About</a>
<a href="https://example.com/products">Products</a> | import re
html_code = '''
<a href="https://example.com/about">About</a>
<a href="https://example.com/products">Products</a>
'''
links = re.findall(r'href="(.*?)"', html_code)
print(links)
# Output: ['https://example.com/about', 'https://example.com/products'] |
[
{
"role": "user",
"content": "You need to write a function to check if given input is a palindrome string.\n\nstring = \"level\""
},
{
"role": "assistant",
"content": "def is_palindrome(string): \n left = 0\n right = len(string) - 1\n \n while right >= left: \n if string[left] !... | You need to write a function to check if given input is a palindrome string. | string = "level" | def is_palindrome(string):
left = 0
right = len(string) - 1
while right >= left:
if string[left] != string[right]:
return False
left += 1
right -= 1
return True |
[
{
"role": "user",
"content": "Construct a query to find all movies released since a given year.\n\nyear: 2000"
},
{
"role": "assistant",
"content": "SELECT * FROM movies\nWHERE year > 2000;"
}
] | Construct a query to find all movies released since a given year. | year: 2000 | SELECT * FROM movies
WHERE year > 2000; |
[
{
"role": "user",
"content": "Write an HTML code to display the results of a survey\n\nSurvey Results:\n- Option A: 40%\n- Option B: 30%\n- Option C: 20%\n- Option D: 10%"
},
{
"role": "assistant",
"content": "<div class=\"survey-results\">\n <p>Survey Results:</p>\n <ul>\n <li>Opti... | Write an HTML code to display the results of a survey | Survey Results:
- Option A: 40%
- Option B: 30%
- Option C: 20%
- Option D: 10% | <div class="survey-results">
<p>Survey Results:</p>
<ul>
<li>Option A: 40%</li>
<li>Option B: 30%</li>
<li>Option C: 20%</li>
<li>Option D: 10%</li>
</ul>
</div> |
[
{
"role": "user",
"content": "Write a SQL query to count how many students are in each grade."
},
{
"role": "assistant",
"content": "SELECT grade, COUNT(*) FROM students GROUP BY grade;"
}
] | Write a SQL query to count how many students are in each grade. | SELECT grade, COUNT(*) FROM students GROUP BY grade; | |
[
{
"role": "user",
"content": "Write a ReactJS code to render a button element with the text \"Submit\"."
},
{
"role": "assistant",
"content": "<button>Submit</button>"
}
] | Write a ReactJS code to render a button element with the text "Submit". | <button>Submit</button> | |
[
{
"role": "user",
"content": "Write a Python code to print \"Hello World!\" on the console."
},
{
"role": "assistant",
"content": "print(\"Hello World!\")"
}
] | Write a Python code to print "Hello World!" on the console. | print("Hello World!") | |
[
{
"role": "user",
"content": "Create an object named 'person' and assign the properties 'name', 'age', and 'hobby'.\n\n\"name\": \"John\",\n\"age\": 18,\n\"hobby\": \"reading\""
},
{
"role": "assistant",
"content": "person = {\n \"name\": \"John\",\n \"age\": 18,\n \"hobby\": \"reading\... | Create an object named 'person' and assign the properties 'name', 'age', and 'hobby'. | "name": "John",
"age": 18,
"hobby": "reading" | person = {
"name": "John",
"age": 18,
"hobby": "reading"
} |
[
{
"role": "user",
"content": "Build an HTML form containing 3 input elements (name, email, password) and a submit button."
},
{
"role": "assistant",
"content": "<form action=\"\">\n Name: <input type=\"text\" name=\"name\">\n Email: <input type=\"email\" name=\"email\">\n Password: <inp... | Build an HTML form containing 3 input elements (name, email, password) and a submit button. | <form action="">
Name: <input type="text" name="name">
Email: <input type="email" name="email">
Password: <input type="password" name="password">
<input type="submit" value="Submit">
</form> | |
[
{
"role": "user",
"content": "Construct a for-loop statement to display the numbers counting from 10 to 15"
},
{
"role": "assistant",
"content": "for (let i = 10; i <= 15; i++) {\n console.log(i);\n}"
}
] | Construct a for-loop statement to display the numbers counting from 10 to 15 | for (let i = 10; i <= 15; i++) {
console.log(i);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.