id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
32,296,199 | en | Python | string_ops | advanced | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
22,511,212 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 390 простым. | public bool IsPrime() {
int n = 390;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 390 простым.
### Response:
public bool IsPrime() {
int n = 390;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,260,784 | en | C++ | var_decl | beginner | How to declare a variable value with value 202202 in C++? | int value = 202202; | ### Instruction:
How to declare a variable value with value 202202 in C++?
### Response:
int value = 202202; |
63,164,057 | kk | C# | string_ops | advanced | C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
34,306,163 | en | JavaScript | string_ops | intermediate | Write a function that checks if a string is a palindrome in JavaScript. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Write a function that checks if a string is a palindrome in JavaScript.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
80,421,424 | en | Python | array_ops | intermediate | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
58,964,619 | kk | C# | array_ops | intermediate | C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
2,666,851 | en | C++ | var_decl | beginner | How to declare a variable health with value 717923 in C++? | int health = 717923; | ### Instruction:
How to declare a variable health with value 717923 in C++?
### Response:
int health = 717923; |
677,740 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 9406. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9406)); | ### Instruction:
Write a function in C# that calculates the factorial of 9406.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9406)); |
47,581,308 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1989 is a leap year in JavaScript. | function isLeap() {
let y = 1989;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1989 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1989;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
60,206,422 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
365,537 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 3409. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(3409));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 3409.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(3409));
} |
51,082,386 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 1994 високосным. | function isLeap() {
let y = 1994;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1994 високосным.
### Response:
function isLeap() {
let y = 1994;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
69,668,753 | en | Unity | logic_ops | advanced | Write logic to check if the year 1939 is a leap year in Unity. | public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1939 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,402,620 | ru | C++ | var_decl | beginner | Как объявить переменную x со значением 404547 в C++? | int x = 404547; | ### Instruction:
Как объявить переменную x со значением 404547 в C++?
### Response:
int x = 404547; |
64,352,119 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
3,453,408 | en | Python | var_decl | beginner | How to declare a variable limit with value 909717 in Python? | limit = 909717 | ### Instruction:
How to declare a variable limit with value 909717 in Python?
### Response:
limit = 909717 |
2,044,943 | en | Java | var_decl | beginner | How to declare a variable data with value 164479 in Java? | int data = 164479; | ### Instruction:
How to declare a variable data with value 164479 in Java?
### Response:
int data = 164479; |
71,613,626 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,694,775 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 285478 в Python? | limit = 285478 | ### Instruction:
Как объявить переменную limit со значением 285478 в Python?
### Response:
limit = 285478 |
1,368,556 | kk | Java | var_decl | beginner | Java тілінде 986244 мәнімен result айнымалысын қалай жариялауға болады? | int result = 986244; | ### Instruction:
Java тілінде 986244 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 986244; |
710,943 | kk | C++ | var_decl | beginner | C++ тілінде 695487 мәнімен health айнымалысын қалай жариялауға болады? | int health = 695487; | ### Instruction:
C++ тілінде 695487 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 695487; |
68,501,032 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 59 простым. | function isPrime() {
let n = 59;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 59 простым.
### Response:
function isPrime() {
let n = 59;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
372,764 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 4441. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4441)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 4441.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4441)); |
3,482,129 | en | Java | var_decl | beginner | How to declare a variable amount with value 384715 in Java? | int amount = 384715; | ### Instruction:
How to declare a variable amount with value 384715 in Java?
### Response:
int amount = 384715; |
67,015 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 2101. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2101)) | ### Instruction:
Write a function in Python that calculates the factorial of 2101.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2101)) |
4,080,330 | kk | C# | var_decl | beginner | C# тілінде 562381 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 562381; | ### Instruction:
C# тілінде 562381 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 562381; |
48,058,438 | kk | Unity | string_ops | intermediate | Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
4,049,087 | ru | JavaScript | var_decl | beginner | Как объявить переменную weight со значением 91922 в JavaScript? | let weight = 91922; | ### Instruction:
Как объявить переменную weight со значением 91922 в JavaScript?
### Response:
let weight = 91922; |
91,288,059 | en | C# | array_ops | intermediate | Write a function that reverses a list in C#. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C#.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
3,538,664 | kk | Java | var_decl | beginner | Java тілінде 259089 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 259089; | ### Instruction:
Java тілінде 259089 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 259089; |
92,274,000 | en | JavaScript | string_ops | advanced | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
424,092 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 5094. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(5094)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 5094.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(5094)) |
2,306,687 | ru | Python | var_decl | beginner | Как объявить переменную speed со значением 543851 в Python? | speed = 543851 | ### Instruction:
Как объявить переменную speed со значением 543851 в Python?
### Response:
speed = 543851 |
4,510,437 | en | Unity | var_decl | beginner | How to declare a variable amount with value 709572 in Unity? | int amount = 709572; | ### Instruction:
How to declare a variable amount with value 709572 in Unity?
### Response:
int amount = 709572; |
3,622,222 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 702510 в JavaScript? | let total = 702510; | ### Instruction:
Как объявить переменную total со значением 702510 в JavaScript?
### Response:
let total = 702510; |
44,733,883 | en | Unity | logic_ops | advanced | Write a function that determines if the number 291 is prime in Unity. | public bool IsPrime() {
int n = 291;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 291 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 291;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
330,000 | ru | Unity | var_decl | beginner | Как объявить переменную size со значением 929558 в Unity? | int size = 929558; | ### Instruction:
Как объявить переменную size со значением 929558 в Unity?
### Response:
int size = 929558; |
46,302,466 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 1996 високосным. | public bool IsLeap() {
int y = 1996;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1996 високосным.
### Response:
public bool IsLeap() {
int y = 1996;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
43,811,446 | en | Java | logic_ops | advanced | Write logic to check if the year 2029 is a leap year in Java. | public bool IsLeap() {
int y = 2029;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2029 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2029;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
10,080,753 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 311 is prime in C++. | public bool IsPrime() {
int n = 311;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 311 is prime in C++.
### Response:
public bool IsPrime() {
int n = 311;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
88,153,397 | kk | Unity | logic_ops | advanced | Unity тилінде 1999 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1999;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1999 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1999;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
48,410,679 | en | Python | array_ops | intermediate | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
54,904,011 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 1941 високосным. | function isLeap() {
let y = 1941;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1941 високосным.
### Response:
function isLeap() {
let y = 1941;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
3,793,358 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 666630 мәнімен x айнымалысын қалай жариялауға болады? | let x = 666630; | ### Instruction:
JavaScript тілінде 666630 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
let x = 666630; |
25,797,884 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 148 is prime in C++. | public bool IsPrime() {
int n = 148;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 148 is prime in C++.
### Response:
public bool IsPrime() {
int n = 148;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
90,425,173 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 498 простым. | function isPrime() {
let n = 498;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 498 простым.
### Response:
function isPrime() {
let n = 498;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
29,346,554 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
663,463 | kk | Java | var_decl | beginner | Java тілінде 152474 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 152474; | ### Instruction:
Java тілінде 152474 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 152474; |
25,787,916 | kk | Java | logic_ops | intermediate | Java тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 72;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 72;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
865,373 | en | JavaScript | var_decl | beginner | How to declare a variable offset with value 217853 in JavaScript? | let offset = 217853; | ### Instruction:
How to declare a variable offset with value 217853 in JavaScript?
### Response:
let offset = 217853; |
89,974,016 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2034 високосным. | function isLeap() {
let y = 2034;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2034 високосным.
### Response:
function isLeap() {
let y = 2034;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
76,131,811 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 118 простым. | public bool IsPrime() {
int n = 118;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 118 простым.
### Response:
public bool IsPrime() {
int n = 118;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
49,491,115 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 105 простым. | def is_prime():
n = 105
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 105 простым.
### Response:
def is_prime():
n = 105
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
937,937 | en | JavaScript | var_decl | beginner | How to declare a variable value with value 566658 in JavaScript? | let value = 566658; | ### Instruction:
How to declare a variable value with value 566658 in JavaScript?
### Response:
let value = 566658; |
3,473,566 | kk | Unity | var_decl | beginner | Unity тілінде 318546 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 318546; | ### Instruction:
Unity тілінде 318546 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 318546; |
95,871,302 | ru | C++ | array_ops | advanced | Напишите на C++ функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
96,126,363 | kk | Python | logic_ops | advanced | Python тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2051
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2051
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
68,800,222 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1984 високосным. | public bool IsLeap() {
int y = 1984;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1984 високосным.
### Response:
public bool IsLeap() {
int y = 1984;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,464,787 | kk | C# | var_decl | beginner | C# тілінде 886 мәнімен size айнымалысын қалай жариялауға болады? | int size = 886; | ### Instruction:
C# тілінде 886 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 886; |
195,966 | kk | Unity | factorial | advanced | Unity тілінде 7992 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7992));
} | ### Instruction:
Unity тілінде 7992 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7992));
} |
48,784,282 | en | Python | string_ops | intermediate | Write a function that checks if a string is a palindrome in Python. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Write a function that checks if a string is a palindrome in Python.
### Response:
def is_palindrome(s):
return s == s[::-1] |
4,282,654 | kk | Python | var_decl | beginner | Python тілінде 756007 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 756007 | ### Instruction:
Python тілінде 756007 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 756007 |
1,649,968 | kk | Unity | var_decl | beginner | Unity тілінде 59281 мәнімен y айнымалысын қалай жариялауға болады? | int y = 59281; | ### Instruction:
Unity тілінде 59281 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 59281; |
69,206,257 | en | Java | string_ops | advanced | Write a function that checks if a string is a palindrome in Java. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Java.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
3,687,898 | kk | Java | var_decl | beginner | Java тілінде 495447 мәнімен size айнымалысын қалай жариялауға болады? | int size = 495447; | ### Instruction:
Java тілінде 495447 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 495447; |
47,960,767 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
31,143,007 | en | C# | array_ops | intermediate | Write a function that reverses a list in C#. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C#.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
52,633,615 | kk | C++ | array_ops | advanced | C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
38,124,563 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на C# функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
20,603,112 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,456,910 | en | C# | var_decl | beginner | How to declare a variable level with value 719503 in C#? | int level = 719503; | ### Instruction:
How to declare a variable level with value 719503 in C#?
### Response:
int level = 719503; |
10,509,784 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
39,349,685 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
14,446,664 | en | Java | logic_ops | advanced | Write a function that determines if the number 168 is prime in Java. | public bool IsPrime() {
int n = 168;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 168 is prime in Java.
### Response:
public bool IsPrime() {
int n = 168;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
84,675,344 | kk | C++ | array_ops | intermediate | C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
49,936,955 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
47,163,204 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
571,242 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 926. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(926) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 926.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(926) << std::endl; |
4,007,851 | en | Python | var_decl | beginner | How to declare a variable rate with value 871527 in Python? | rate = 871527 | ### Instruction:
How to declare a variable rate with value 871527 in Python?
### Response:
rate = 871527 |
52,367,191 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
23,371,778 | en | C# | array_ops | intermediate | Write a function that finds the maximum number in an array in C#. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C#.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
263,557 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 3983-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(3983)); | ### Instruction:
JavaScript тілінде 1-ден 3983-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(3983)); |
10,700,006 | en | JavaScript | string_ops | advanced | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
21,558,158 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
91,022,079 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
10,435,972 | kk | C# | array_ops | advanced | C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
25,028,580 | en | C++ | logic_ops | advanced | Write a function that determines if the number 16 is prime in C++. | public bool IsPrime() {
int n = 16;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 16 is prime in C++.
### Response:
public bool IsPrime() {
int n = 16;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
25,210 | ru | Java | func_def | intermediate | Напиши функцию compute в Java, которая принимает timer и удваивает его. | static int compute(int timer) {
return timer * 2;
} | ### Instruction:
Напиши функцию compute в Java, которая принимает timer и удваивает его.
### Response:
static int compute(int timer) {
return timer * 2;
} |
90,628,824 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
3,513,211 | kk | Unity | var_decl | beginner | Unity тілінде 62706 мәнімен count айнымалысын қалай жариялауға болады? | int count = 62706; | ### Instruction:
Unity тілінде 62706 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 62706; |
17,464,639 | en | Java | logic_ops | advanced | Write logic to check if the year 2059 is a leap year in Java. | public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2059 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
64,809,079 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
93,946,472 | en | Unity | string_ops | intermediate | Write a function that checks if a string is a palindrome in Unity. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Unity.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
4,387,164 | kk | Unity | var_decl | beginner | Unity тілінде 440928 мәнімен health айнымалысын қалай жариялауға болады? | int health = 440928; | ### Instruction:
Unity тілінде 440928 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 440928; |
59,396,605 | kk | Python | logic_ops | intermediate | Python тилінде 426 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 426
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 426 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 426
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
52,869,672 | en | C# | array_ops | advanced | Write a function that filters only even numbers from a list in C#. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C#.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
62,933,073 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1915 is a leap year in JavaScript. | function isLeap() {
let y = 1915;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1915 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1915;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
38,117,274 | kk | Java | string_ops | intermediate | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
30,196,318 | en | Java | logic_ops | advanced | Write logic to check if the year 2043 is a leap year in Java. | public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2043 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.