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
270,029
en
JavaScript
var_decl
beginner
How to declare a variable value with value 520196 in JavaScript?
let value = 520196;
### Instruction: How to declare a variable value with value 520196 in JavaScript? ### Response: let value = 520196;
64,027,556
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
3,418,597
kk
Java
var_decl
beginner
Java тілінде 872947 мәнімен health айнымалысын қалай жариялауға болады?
int health = 872947;
### Instruction: Java тілінде 872947 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 872947;
89,939,939
kk
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; }
2,796,391
kk
Unity
var_decl
beginner
Unity тілінде 18095 мәнімен y айнымалысын қалай жариялауға болады?
int y = 18095;
### Instruction: Unity тілінде 18095 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 18095;
44,767,484
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]
3,505,377
en
C++
var_decl
beginner
How to declare a variable timer with value 225697 in C++?
int timer = 225697;
### Instruction: How to declare a variable timer with value 225697 in C++? ### Response: int timer = 225697;
33,273,093
en
Python
logic_ops
advanced
Write logic to check if the year 2050 is a leap year in Python.
def is_leap(): year = 2050 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2050 is a leap year in Python. ### Response: def is_leap(): year = 2050 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
15,327,148
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; }
2,217,090
en
C++
var_decl
beginner
How to declare a variable value with value 100963 in C++?
int value = 100963;
### Instruction: How to declare a variable value with value 100963 in C++? ### Response: int value = 100963;
66,245,087
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
70,667,915
kk
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); }
24,800,020
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 300 простым.
public bool IsPrime() { int n = 300; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 300 простым. ### Response: public bool IsPrime() { int n = 300; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,445,171
kk
C++
var_decl
beginner
C++ тілінде 874463 мәнімен health айнымалысын қалай жариялауға болады?
int health = 874463;
### Instruction: C++ тілінде 874463 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 874463;
4,164,391
ru
C#
var_decl
beginner
Как объявить переменную y со значением 137864 в C#?
int y = 137864;
### Instruction: Как объявить переменную y со значением 137864 в C#? ### Response: int y = 137864;
2,739,286
kk
JavaScript
var_decl
beginner
JavaScript тілінде 968801 мәнімен y айнымалысын қалай жариялауға болады?
let y = 968801;
### Instruction: JavaScript тілінде 968801 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 968801;
88,528,454
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1997 високосным.
def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1997 високосным. ### Response: def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
74,800,161
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2021 високосным.
function isLeap() { let y = 2021; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2021 високосным. ### Response: function isLeap() { let y = 2021; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
2,416,679
ru
Python
var_decl
beginner
Как объявить переменную data со значением 323075 в Python?
data = 323075
### Instruction: Как объявить переменную data со значением 323075 в Python? ### Response: data = 323075
50,462,751
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); }
68,749,540
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,231,383
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 812840 в Unity?
int weight = 812840;
### Instruction: Как объявить переменную weight со значением 812840 в Unity? ### Response: int weight = 812840;
4,554,112
en
JavaScript
var_decl
beginner
How to declare a variable data with value 557945 in JavaScript?
let data = 557945;
### Instruction: How to declare a variable data with value 557945 in JavaScript? ### Response: let data = 557945;
62,748,030
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 326 простым.
def is_prime(): n = 326 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 326 простым. ### Response: def is_prime(): n = 326 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
70,051,455
kk
Python
logic_ops
advanced
Python тилінде 177 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 177 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 177 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 177 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
55,575,835
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,710,218
en
Python
var_decl
beginner
How to declare a variable score with value 996851 in Python?
score = 996851
### Instruction: How to declare a variable score with value 996851 in Python? ### Response: score = 996851
67,459,946
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
230,659
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 8890.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8890));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 8890. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8890));
69,090,663
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1901 високосным.
public bool IsLeap() { int y = 1901; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1901 високосным. ### Response: public bool IsLeap() { int y = 1901; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
92,192,464
kk
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аеёиоуыэюя')
93,003,983
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
72,446,121
kk
Java
array_ops
intermediate
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,948,470
kk
C#
var_decl
beginner
C# тілінде 106172 мәнімен size айнымалысын қалай жариялауға болады?
int size = 106172;
### Instruction: C# тілінде 106172 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 106172;
3,788,661
en
Unity
var_decl
beginner
How to declare a variable score with value 548942 in Unity?
int score = 548942;
### Instruction: How to declare a variable score with value 548942 in Unity? ### Response: int score = 548942;
2,907,027
en
C++
var_decl
beginner
How to declare a variable count with value 871710 in C++?
int count = 871710;
### Instruction: How to declare a variable count with value 871710 in C++? ### Response: int count = 871710;
1,201,290
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 24972 в Python?
weight = 24972
### Instruction: Как объявить переменную weight со значением 24972 в Python? ### Response: weight = 24972
12,701,702
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; }
1,086,722
kk
Unity
var_decl
beginner
Unity тілінде 427867 мәнімен x айнымалысын қалай жариялауға болады?
int x = 427867;
### Instruction: Unity тілінде 427867 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 427867;
47,377,177
kk
C++
logic_ops
intermediate
C++ тилінде 1972 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1972; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1972 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1972; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
95,392,027
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(); }
97,057,381
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; }
3,300,640
kk
C++
var_decl
beginner
C++ тілінде 73088 мәнімен x айнымалысын қалай жариялауға болады?
int x = 73088;
### Instruction: C++ тілінде 73088 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 73088;
155,972
kk
Python
factorial
advanced
Python тілінде 2442 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2442))
### Instruction: Python тілінде 2442 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2442))
54,442,049
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); }
17,560,789
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; }
2,967,079
kk
Java
var_decl
beginner
Java тілінде 737183 мәнімен size айнымалысын қалай жариялауға болады?
int size = 737183;
### Instruction: Java тілінде 737183 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 737183;
565,828
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 141367 в C#?
int timer = 141367;
### Instruction: Как объявить переменную timer со значением 141367 в C#? ### Response: int timer = 141367;
84,231,401
en
C#
logic_ops
intermediate
Write logic to check if the year 2054 is a leap year in C#.
public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2054 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,469,616
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; }
62,671,604
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
1,117,226
ru
Java
var_decl
beginner
Как объявить переменную count со значением 484405 в Java?
int count = 484405;
### Instruction: Как объявить переменную count со значением 484405 в Java? ### Response: int count = 484405;
20,281,616
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); }
46,349,596
en
C#
logic_ops
advanced
Write logic to check if the year 1979 is a leap year in C#.
public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1979 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
539,034
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 5004.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(5004) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 5004. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(5004) << std::endl;
4,519,642
ru
Java
var_decl
beginner
Как объявить переменную limit со значением 456691 в Java?
int limit = 456691;
### Instruction: Как объявить переменную limit со значением 456691 в Java? ### Response: int limit = 456691;
1,130,946
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 818284 в Unity?
int timer = 818284;
### Instruction: Как объявить переменную timer со значением 818284 в Unity? ### Response: int timer = 818284;
87,768,543
ru
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; }
85,320,033
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; }
96,203,041
kk
Python
logic_ops
intermediate
Python тилінде 282 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 282 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 282 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 282 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
78,979,931
en
Unity
logic_ops
intermediate
Write logic to check if the year 1957 is a leap year in Unity.
public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1957 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
578
en
C++
func_def
intermediate
Write a function normalize in C++ that takes index and doubles it.
int normalize(int index) { return index * 2; }
### Instruction: Write a function normalize in C++ that takes index and doubles it. ### Response: int normalize(int index) { return index * 2; }
55,470,230
ru
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); }
340,636
ru
C++
var_decl
beginner
Как объявить переменную y со значением 693022 в C++?
int y = 693022;
### Instruction: Как объявить переменную y со значением 693022 в C++? ### Response: int y = 693022;
2,492,534
ru
C++
var_decl
beginner
Как объявить переменную rate со значением 647664 в C++?
int rate = 647664;
### Instruction: Как объявить переменную rate со значением 647664 в C++? ### Response: int rate = 647664;
98,936,121
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 471 простым.
public bool IsPrime() { int n = 471; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 471 простым. ### Response: public bool IsPrime() { int n = 471; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,865,238
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; }
93,367,617
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; }
56,764,412
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
406,701
kk
JavaScript
factorial
advanced
JavaScript тілінде 4401 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4401));
### Instruction: JavaScript тілінде 4401 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4401));
26,908,353
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
47,548,221
ru
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; }
43,553,931
en
Python
array_ops
intermediate
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]
1,274,211
en
Unity
var_decl
beginner
How to declare a variable limit with value 31604 in Unity?
int limit = 31604;
### Instruction: How to declare a variable limit with value 31604 in Unity? ### Response: int limit = 31604;
795,381
en
Python
var_decl
beginner
How to declare a variable health with value 571809 in Python?
health = 571809
### Instruction: How to declare a variable health with value 571809 in Python? ### Response: health = 571809
51,667,743
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]
19,753,552
kk
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); }
3,035,354
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 368643 in JavaScript?
let speed = 368643;
### Instruction: How to declare a variable speed with value 368643 in JavaScript? ### Response: let speed = 368643;
84,710,975
en
JavaScript
string_ops
advanced
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();
33,908,318
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2094 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2094; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2094 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2094; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
855,409
en
C#
var_decl
beginner
How to declare a variable weight with value 962776 in C#?
int weight = 962776;
### Instruction: How to declare a variable weight with value 962776 in C#? ### Response: int weight = 962776;
49,336,663
kk
C++
logic_ops
intermediate
C++ тилінде 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: C++ тилінде 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; }
78,787,309
kk
C++
logic_ops
intermediate
C++ тилінде 176 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 176; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 176 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 176; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
18,032,335
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
54,243,425
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 195 простым.
public bool IsPrime() { int n = 195; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 195 простым. ### Response: public bool IsPrime() { int n = 195; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
80,543,732
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; }
29,885,796
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
25,613,815
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; }
4,474,566
en
Python
var_decl
beginner
How to declare a variable level with value 43676 in Python?
level = 43676
### Instruction: How to declare a variable level with value 43676 in Python? ### Response: level = 43676
250,056
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 6768.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6768))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 6768. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6768))
27,692,990
ru
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; }
76,145,167
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
90,691,285
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1998 is a leap year in JavaScript.
function isLeap() { let y = 1998; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1998 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1998; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
73,119,334
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,394,591
en
C++
var_decl
beginner
How to declare a variable level with value 680961 in C++?
int level = 680961;
### Instruction: How to declare a variable level with value 680961 in C++? ### Response: int level = 680961;
38,890,643
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
3,780,975
kk
JavaScript
var_decl
beginner
JavaScript тілінде 164342 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 164342;
### Instruction: JavaScript тілінде 164342 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 164342;
36,493,457
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; }
2,107,963
ru
C#
var_decl
beginner
Как объявить переменную data со значением 906336 в C#?
int data = 906336;
### Instruction: Как объявить переменную data со значением 906336 в C#? ### Response: int data = 906336;
25,738,961
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; }