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
71,379,623
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; }
78,569,953
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
541,553
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 6855.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6855));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 6855. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6855));
50,125,730
en
C++
array_ops
advanced
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); }
53,222,582
kk
Unity
array_ops
advanced
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
31,202,581
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
2,880,659
kk
C++
var_decl
beginner
C++ тілінде 260063 мәнімен y айнымалысын қалай жариялауға болады?
int y = 260063;
### Instruction: C++ тілінде 260063 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 260063;
81,073,062
kk
Python
logic_ops
intermediate
Python тилінде 2064 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2064 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2064 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2064 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,707,289
kk
Unity
var_decl
beginner
Unity тілінде 430989 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 430989;
### Instruction: Unity тілінде 430989 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 430989;
80,595
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 3626.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3626));
### Instruction: Write a function in C# that sums numbers from 1 to 3626. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3626));
43,146,501
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); }
316,545
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 4817.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4817) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 4817. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4817) << std::endl;
90,691,895
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(); }
89,520,979
kk
Python
logic_ops
advanced
Python тилінде 218 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 218 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 218 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 218 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,723,506
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 4152 в JavaScript?
let total = 4152;
### Instruction: Как объявить переменную total со значением 4152 в JavaScript? ### Response: let total = 4152;
60,018,248
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 272 is prime in JavaScript.
function isPrime() { let n = 272; 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 272 is prime in JavaScript. ### Response: function isPrime() { let n = 272; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
10,931,092
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1909 високосным.
public bool IsLeap() { int y = 1909; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1909 високосным. ### Response: public bool IsLeap() { int y = 1909; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
27,922,757
kk
Unity
array_ops
intermediate
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
68,768,008
ru
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; }
4,440,404
kk
Java
var_decl
beginner
Java тілінде 164987 мәнімен result айнымалысын қалай жариялауға болады?
int result = 164987;
### Instruction: Java тілінде 164987 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 164987;
81,990,037
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
36,867,751
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 278 простым.
public bool IsPrime() { int n = 278; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 278 простым. ### Response: public bool IsPrime() { int n = 278; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,606,853
ru
JavaScript
var_decl
beginner
Как объявить переменную buffer со значением 22769 в JavaScript?
let buffer = 22769;
### Instruction: Как объявить переменную buffer со значением 22769 в JavaScript? ### Response: let buffer = 22769;
585,106
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 7453.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7453));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 7453. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7453));
79,365,122
en
Java
array_ops
intermediate
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; }
2,694,412
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 336856 в Python?
rate = 336856
### Instruction: Как объявить переменную rate со значением 336856 в Python? ### Response: rate = 336856
4,368,066
en
Python
var_decl
beginner
How to declare a variable timer with value 728556 in Python?
timer = 728556
### Instruction: How to declare a variable timer with value 728556 in Python? ### Response: timer = 728556
1,030,942
ru
C#
var_decl
beginner
Как объявить переменную weight со значением 118657 в C#?
int weight = 118657;
### Instruction: Как объявить переменную weight со значением 118657 в C#? ### Response: int weight = 118657;
2,590,042
en
C++
var_decl
beginner
How to declare a variable index with value 724503 in C++?
int index = 724503;
### Instruction: How to declare a variable index with value 724503 in C++? ### Response: int index = 724503;
36,189,182
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аеёиоуыэюя')
778,384
kk
JavaScript
var_decl
beginner
JavaScript тілінде 280558 мәнімен data айнымалысын қалай жариялауға болады?
let data = 280558;
### Instruction: JavaScript тілінде 280558 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 280558;
80,739,965
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
1,070,685
kk
Unity
var_decl
beginner
Unity тілінде 355741 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 355741;
### Instruction: Unity тілінде 355741 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 355741;
19,168,326
ru
C#
array_ops
intermediate
Напишите на 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; }
125,272
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 4408.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4408))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 4408. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4408))
12,504,869
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; }
21,086,703
en
C++
string_ops
advanced
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; }
80,113,378
kk
Python
logic_ops
intermediate
Python тилінде 57 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 57 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 57 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 57 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
239,248
en
Unity
var_decl
beginner
How to declare a variable count with value 435367 in Unity?
int count = 435367;
### Instruction: How to declare a variable count with value 435367 in Unity? ### Response: int count = 435367;
29,821
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 7178.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7178) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 7178. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7178) << std::endl;
46,025,309
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аеёиоуыэюя')
12,249,882
ru
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аеёиоуыэюя')
443,450
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 9189.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9189)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 9189. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9189)); }
34,373,801
kk
C++
logic_ops
intermediate
C++ тилінде 2049 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2049 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,356,594
kk
C#
var_decl
beginner
C# тілінде 256714 мәнімен total айнымалысын қалай жариялауға болады?
int total = 256714;
### Instruction: C# тілінде 256714 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 256714;
62,514,204
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2055 високосным.
function isLeap() { let y = 2055; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2055 високосным. ### Response: function isLeap() { let y = 2055; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
80,392,552
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
70,872,048
en
Python
string_ops
advanced
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
24,446,935
en
JavaScript
array_ops
intermediate
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
741,457
en
C#
var_decl
beginner
How to declare a variable total with value 902658 in C#?
int total = 902658;
### Instruction: How to declare a variable total with value 902658 in C#? ### Response: int total = 902658;
1,346,651
ru
C#
var_decl
beginner
Как объявить переменную x со значением 62134 в C#?
int x = 62134;
### Instruction: Как объявить переменную x со значением 62134 в C#? ### Response: int x = 62134;
255,900
kk
C++
factorial
advanced
C++ тілінде 327 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(327) << std::endl;
### Instruction: C++ тілінде 327 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(327) << std::endl;
1,293,888
kk
C++
var_decl
beginner
C++ тілінде 771998 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 771998;
### Instruction: C++ тілінде 771998 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 771998;
75,825,949
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
1,332,964
en
C#
var_decl
beginner
How to declare a variable score with value 943614 in C#?
int score = 943614;
### Instruction: How to declare a variable score with value 943614 in C#? ### Response: int score = 943614;
4,276,765
en
C++
var_decl
beginner
How to declare a variable health with value 588568 in C++?
int health = 588568;
### Instruction: How to declare a variable health with value 588568 in C++? ### Response: int health = 588568;
2,717,608
kk
Java
var_decl
beginner
Java тілінде 95551 мәнімен total айнымалысын қалай жариялауға болады?
int total = 95551;
### Instruction: Java тілінде 95551 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 95551;
44,194,041
ru
Unity
string_ops
advanced
Напишите на 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; }
76,352,455
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
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 Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
12,397,072
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
324,128
kk
Java
sum_n
intermediate
Java тілінде 1-ден 7362-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7362));
### Instruction: Java тілінде 1-ден 7362-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7362));
4,509,954
en
C#
var_decl
beginner
How to declare a variable y with value 737686 in C#?
int y = 737686;
### Instruction: How to declare a variable y with value 737686 in C#? ### Response: int y = 737686;
4,053,909
en
JavaScript
var_decl
beginner
How to declare a variable total with value 750603 in JavaScript?
let total = 750603;
### Instruction: How to declare a variable total with value 750603 in JavaScript? ### Response: let total = 750603;
69,047,121
kk
C#
logic_ops
advanced
C# тилінде 2015 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2015; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2015 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2015; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
53,903,765
en
C++
logic_ops
intermediate
Write a function that determines if the number 117 is prime in C++.
public bool IsPrime() { int n = 117; 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 117 is prime in C++. ### Response: public bool IsPrime() { int n = 117; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
55,005,764
en
C++
string_ops
intermediate
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; }
35,363,163
kk
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); }
180,797
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 1258.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1258));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 1258. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1258));
18,899,714
kk
Unity
array_ops
advanced
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; }
3,597,824
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 439647 в C++?
int limit = 439647;
### Instruction: Как объявить переменную limit со значением 439647 в C++? ### Response: int limit = 439647;
1,875,497
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 845692 в JavaScript?
let value = 845692;
### Instruction: Как объявить переменную value со значением 845692 в JavaScript? ### Response: let value = 845692;
2,559,314
kk
C#
var_decl
beginner
C# тілінде 241925 мәнімен size айнымалысын қалай жариялауға болады?
int size = 241925;
### Instruction: C# тілінде 241925 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 241925;
760,862
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 1494.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1494));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 1494. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1494));
48,005,034
en
Unity
string_ops
intermediate
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
41,838,659
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 314 простым.
function isPrime() { let n = 314; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 314 простым. ### Response: function isPrime() { let n = 314; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
71,699,226
en
Python
string_ops
intermediate
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аеёиоуыэюя')
60,949,620
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1985 високосным.
def is_leap(): year = 1985 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1985 високосным. ### Response: def is_leap(): year = 1985 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,624,505
kk
Java
var_decl
beginner
Java тілінде 236949 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 236949;
### Instruction: Java тілінде 236949 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 236949;
56,790,533
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
763,764
kk
Unity
factorial
advanced
Unity тілінде 354 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(354)); }
### Instruction: Unity тілінде 354 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(354)); }
730,169
en
C++
var_decl
beginner
How to declare a variable x with value 15494 in C++?
int x = 15494;
### Instruction: How to declare a variable x with value 15494 in C++? ### Response: int x = 15494;
36,017,780
en
Unity
logic_ops
intermediate
Write a function that determines if the number 373 is prime in Unity.
public bool IsPrime() { int n = 373; 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 373 is prime in Unity. ### Response: public bool IsPrime() { int n = 373; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
63,025,939
kk
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; }
44,716,654
en
C#
logic_ops
intermediate
Write logic to check if the year 2041 is a leap year in C#.
public bool IsLeap() { int y = 2041; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2041 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2041; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
80,418,386
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,651,546
kk
C#
logic_ops
advanced
C# тилінде 1947 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1947 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,363,140
kk
C++
var_decl
beginner
C++ тілінде 14419 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 14419;
### Instruction: C++ тілінде 14419 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 14419;
1,314,952
en
C++
var_decl
beginner
How to declare a variable buffer with value 851953 in C++?
int buffer = 851953;
### Instruction: How to declare a variable buffer with value 851953 in C++? ### Response: int buffer = 851953;
4,726,855
en
Unity
var_decl
beginner
How to declare a variable health with value 831024 in Unity?
int health = 831024;
### Instruction: How to declare a variable health with value 831024 in Unity? ### Response: int health = 831024;
174,614
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 6810.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6810));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 6810. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6810));
205,000
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 9522.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9522))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 9522. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9522))
3,942,574
en
JavaScript
var_decl
beginner
How to declare a variable total with value 981370 in JavaScript?
let total = 981370;
### Instruction: How to declare a variable total with value 981370 in JavaScript? ### Response: let total = 981370;
4,177,385
en
Python
var_decl
beginner
How to declare a variable speed with value 32888 in Python?
speed = 32888
### Instruction: How to declare a variable speed with value 32888 in Python? ### Response: speed = 32888
892,368
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 5026.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5026));
### Instruction: Write a function in Java that calculates the factorial of 5026. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5026));
69,708,893
en
C++
string_ops
intermediate
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(); }
783,390
en
Python
var_decl
beginner
How to declare a variable count with value 381843 in Python?
count = 381843
### Instruction: How to declare a variable count with value 381843 in Python? ### Response: count = 381843
62,873,115
en
C++
logic_ops
intermediate
Write a function that determines if the number 115 is prime in C++.
public bool IsPrime() { int n = 115; 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 115 is prime in C++. ### Response: public bool IsPrime() { int n = 115; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,333,421
kk
JavaScript
var_decl
beginner
JavaScript тілінде 167742 мәнімен result айнымалысын қалай жариялауға болады?
let result = 167742;
### Instruction: JavaScript тілінде 167742 мәнімен result айнымалысын қалай жариялауға болады? ### Response: let result = 167742;
2,716,307
en
C#
var_decl
beginner
How to declare a variable result with value 144973 in C#?
int result = 144973;
### Instruction: How to declare a variable result with value 144973 in C#? ### Response: int result = 144973;
20,838,520
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();