id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
38,529,110
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; }
3,266,173
en
Java
var_decl
beginner
How to declare a variable y with value 642175 in Java?
int y = 642175;
### Instruction: How to declare a variable y with value 642175 in Java? ### Response: int y = 642175;
119,282
kk
Python
factorial
advanced
Python тілінде 3687 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3687))
### Instruction: Python тілінде 3687 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3687))
23,404,707
en
C++
array_ops
intermediate
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; }
380,427
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1318.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1318));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1318. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1318));
2,435,789
en
Python
var_decl
beginner
How to declare a variable index with value 313658 in Python?
index = 313658
### Instruction: How to declare a variable index with value 313658 in Python? ### Response: index = 313658
15,277,797
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
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 C++. ### 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; }
2,485,997
kk
C++
var_decl
beginner
C++ тілінде 500330 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 500330;
### Instruction: C++ тілінде 500330 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 500330;
2,312,932
ru
Java
var_decl
beginner
Как объявить переменную data со значением 397159 в Java?
int data = 397159;
### Instruction: Как объявить переменную data со значением 397159 в Java? ### Response: int data = 397159;
78,526,821
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
52,323,061
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; }
1,008,767
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 754730 в JavaScript?
let weight = 754730;
### Instruction: Как объявить переменную weight со значением 754730 в JavaScript? ### Response: let weight = 754730;
88,022,504
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
1,812,562
en
Python
var_decl
beginner
How to declare a variable weight with value 307799 in Python?
weight = 307799
### Instruction: How to declare a variable weight with value 307799 in Python? ### Response: weight = 307799
1,048,194
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 975105 в C++?
int limit = 975105;
### Instruction: Как объявить переменную limit со значением 975105 в C++? ### Response: int limit = 975105;
85,152,641
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2049 високосным.
function isLeap() { let y = 2049; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2049 високосным. ### Response: function isLeap() { let y = 2049; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
89,634,050
kk
Python
string_ops
advanced
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аеёиоуыэюя')
4,193,671
kk
C++
var_decl
beginner
C++ тілінде 533137 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 533137;
### Instruction: C++ тілінде 533137 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 533137;
41,105,141
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1928 високосным.
function isLeap() { let y = 1928; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1928 високосным. ### Response: function isLeap() { let y = 1928; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
53,872,446
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,696,667
kk
Unity
var_decl
beginner
Unity тілінде 311382 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 311382;
### Instruction: Unity тілінде 311382 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 311382;
22,014,976
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 447 простым.
def is_prime(): n = 447 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 447 простым. ### Response: def is_prime(): n = 447 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
24,875,583
en
Java
string_ops
intermediate
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,740,004
en
Python
var_decl
beginner
How to declare a variable index with value 314984 in Python?
index = 314984
### Instruction: How to declare a variable index with value 314984 in Python? ### Response: index = 314984
4,222,069
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 379574 в JavaScript?
let x = 379574;
### Instruction: Как объявить переменную x со значением 379574 в JavaScript? ### Response: let x = 379574;
1,135,805
en
Python
var_decl
beginner
How to declare a variable result with value 29972 in Python?
result = 29972
### Instruction: How to declare a variable result with value 29972 in Python? ### Response: result = 29972
260,629
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 4256.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4256)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 4256. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4256)); }
1,002,550
kk
C#
var_decl
beginner
C# тілінде 258762 мәнімен size айнымалысын қалай жариялауға болады?
int size = 258762;
### Instruction: C# тілінде 258762 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 258762;
38,735,644
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; }
91,272,016
en
Python
array_ops
advanced
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
405,505
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 6618.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6618)); }
### Instruction: Write a function in Unity that calculates the factorial of 6618. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6618)); }
92,084,337
en
JavaScript
string_ops
intermediate
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;
99,766,399
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,926,892
kk
JavaScript
var_decl
beginner
JavaScript тілінде 419950 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 419950;
### Instruction: JavaScript тілінде 419950 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 419950;
42,593,412
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
14,415,165
en
C#
string_ops
advanced
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
93,210,348
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
33,161,192
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
87,662,580
en
Python
logic_ops
advanced
Write a function that determines if the number 392 is prime in Python.
def is_prime(): n = 392 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 392 is prime in Python. ### Response: def is_prime(): n = 392 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,945,472
kk
Python
var_decl
beginner
Python тілінде 575894 мәнімен x айнымалысын қалай жариялауға болады?
x = 575894
### Instruction: Python тілінде 575894 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 575894
56,307,292
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
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 Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
77,621,630
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 311 простым.
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: Напишите на C# функцию, определяющую, является ли число 311 простым. ### 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; }
2,384,331
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 10402 в Java?
int amount = 10402;
### Instruction: Как объявить переменную amount со значением 10402 в Java? ### Response: int amount = 10402;
10,503,076
en
C++
logic_ops
advanced
Write a function that determines if the number 286 is prime in C++.
public bool IsPrime() { int n = 286; 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 286 is prime in C++. ### Response: public bool IsPrime() { int n = 286; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
74,814,956
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1903 високосным.
function isLeap() { let y = 1903; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1903 високосным. ### Response: function isLeap() { let y = 1903; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,758,629
en
C++
var_decl
beginner
How to declare a variable speed with value 654045 in C++?
int speed = 654045;
### Instruction: How to declare a variable speed with value 654045 in C++? ### Response: int speed = 654045;
2,240,883
kk
Python
var_decl
beginner
Python тілінде 604769 мәнімен score айнымалысын қалай жариялауға болады?
score = 604769
### Instruction: Python тілінде 604769 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 604769
38,631,014
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Unity функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,510,918
en
C#
var_decl
beginner
How to declare a variable size with value 445905 in C#?
int size = 445905;
### Instruction: How to declare a variable size with value 445905 in C#? ### Response: int size = 445905;
4,377,527
kk
C#
var_decl
beginner
C# тілінде 888937 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 888937;
### Instruction: C# тілінде 888937 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 888937;
3,072,516
en
JavaScript
var_decl
beginner
How to declare a variable weight with value 869271 in JavaScript?
let weight = 869271;
### Instruction: How to declare a variable weight with value 869271 in JavaScript? ### Response: let weight = 869271;
23,773,945
en
JavaScript
array_ops
intermediate
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
17,463,974
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,711,545
kk
C++
var_decl
beginner
C++ тілінде 187740 мәнімен level айнымалысын қалай жариялауға болады?
int level = 187740;
### Instruction: C++ тілінде 187740 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 187740;
24,092,428
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; }
41,494,901
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
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: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### 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; }
4,717,001
kk
JavaScript
var_decl
beginner
JavaScript тілінде 31399 мәнімен level айнымалысын қалай жариялауға болады?
let level = 31399;
### Instruction: JavaScript тілінде 31399 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 31399;
71,204,589
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2004 високосным.
public bool IsLeap() { int y = 2004; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2004 високосным. ### Response: public bool IsLeap() { int y = 2004; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
666,750
kk
C++
var_decl
beginner
C++ тілінде 896226 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 896226;
### Instruction: C++ тілінде 896226 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 896226;
98,675,377
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1912 високосным.
public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1912 високосным. ### Response: public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,946,347
kk
Java
var_decl
beginner
Java тілінде 297745 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 297745;
### Instruction: Java тілінде 297745 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 297745;
28,068,464
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2045 високосным.
public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2045 високосным. ### Response: public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
90,270,778
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
13,343,733
kk
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; }
782,150
en
Unity
var_decl
beginner
How to declare a variable y with value 74386 in Unity?
int y = 74386;
### Instruction: How to declare a variable y with value 74386 in Unity? ### Response: int y = 74386;
91,052,025
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1997 високосным.
public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1997 високосным. ### Response: public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
53,805,345
ru
C#
array_ops
advanced
Напишите на C# функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C# функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
87,103,034
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; }
4,766,419
kk
Python
var_decl
beginner
Python тілінде 827017 мәнімен score айнымалысын қалай жариялауға болады?
score = 827017
### Instruction: Python тілінде 827017 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 827017
22,745,001
en
Unity
logic_ops
intermediate
Write logic to check if the year 2052 is a leap year in Unity.
public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2052 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,954,136
en
Python
var_decl
beginner
How to declare a variable speed with value 418939 in Python?
speed = 418939
### Instruction: How to declare a variable speed with value 418939 in Python? ### Response: speed = 418939
66,468,187
kk
Unity
logic_ops
intermediate
Unity тилінде 1959 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1959; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1959 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1959; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
64,629,198
kk
C++
logic_ops
advanced
C++ тилінде 276 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 276; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 276 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 276; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
27,775,307
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
29,361,586
en
Java
logic_ops
intermediate
Write logic to check if the year 1992 is a leap year in Java.
public bool IsLeap() { int y = 1992; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1992 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1992; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
16,497,416
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); }
4,608,352
ru
Python
var_decl
beginner
Как объявить переменную y со значением 982946 в Python?
y = 982946
### Instruction: Как объявить переменную y со значением 982946 в Python? ### Response: y = 982946
2,678,350
ru
C++
var_decl
beginner
Как объявить переменную value со значением 865721 в C++?
int value = 865721;
### Instruction: Как объявить переменную value со значением 865721 в C++? ### Response: int value = 865721;
11,617,186
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]
46,796,639
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
37,982,304
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 423 простым.
public bool IsPrime() { int n = 423; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 423 простым. ### Response: public bool IsPrime() { int n = 423; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
88,007,336
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аеёиоуыэюя')
4,192,008
en
Java
var_decl
beginner
How to declare a variable count with value 146153 in Java?
int count = 146153;
### Instruction: How to declare a variable count with value 146153 in Java? ### Response: int count = 146153;
90,655,488
kk
Java
string_ops
advanced
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; }
15,213,538
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
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: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### 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; }
2,961,769
kk
Python
var_decl
beginner
Python тілінде 89704 мәнімен result айнымалысын қалай жариялауға болады?
result = 89704
### Instruction: Python тілінде 89704 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 89704
557,013
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 2946.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2946))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 2946. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2946))
74,942,097
en
C#
string_ops
advanced
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,297,926
en
C++
var_decl
beginner
How to declare a variable size with value 733666 in C++?
int size = 733666;
### Instruction: How to declare a variable size with value 733666 in C++? ### Response: int size = 733666;
2,204,118
en
Python
var_decl
beginner
How to declare a variable x with value 178665 in Python?
x = 178665
### Instruction: How to declare a variable x with value 178665 in Python? ### Response: x = 178665
27,996,804
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 74 is prime in JavaScript.
function isPrime() { let n = 74; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 74 is prime in JavaScript. ### Response: function isPrime() { let n = 74; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,617,779
en
Java
var_decl
beginner
How to declare a variable result with value 800061 in Java?
int result = 800061;
### Instruction: How to declare a variable result with value 800061 in Java? ### Response: int result = 800061;
4,381,030
en
Python
var_decl
beginner
How to declare a variable weight with value 598192 in Python?
weight = 598192
### Instruction: How to declare a variable weight with value 598192 in Python? ### Response: weight = 598192
79,989,381
en
C++
string_ops
advanced
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
15,127,511
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
88,218,880
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; }
72,134,344
en
C#
array_ops
intermediate
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; }
98,266,056
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
960,727
kk
C#
sum_n
intermediate
C# тілінде 1-ден 421-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(421));
### Instruction: C# тілінде 1-ден 421-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(421));
61,168,341
en
JavaScript
array_ops
intermediate
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);