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
3,360,608
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 613822 в JavaScript?
let health = 613822;
### Instruction: Как объявить переменную health со значением 613822 в JavaScript? ### Response: let health = 613822;
30,652,694
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; }
57,748,499
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 105 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 105; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 105 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 105; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,221,784
kk
C++
var_decl
beginner
C++ тілінде 222153 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 222153;
### Instruction: C++ тілінде 222153 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 222153;
34,877,424
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
496,168
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 5221-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5221)); }
### Instruction: Unity тілінде 1-ден 5221-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5221)); }
1,783,102
en
JavaScript
var_decl
beginner
How to declare a variable score with value 999228 in JavaScript?
let score = 999228;
### Instruction: How to declare a variable score with value 999228 in JavaScript? ### Response: let score = 999228;
27,854,509
kk
C++
string_ops
advanced
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; }
20,771,723
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; }
95,675,217
en
Python
logic_ops
advanced
Write a function that determines if the number 497 is prime in Python.
def is_prime(): n = 497 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 497 is prime in Python. ### Response: def is_prime(): n = 497 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,861,653
en
Unity
var_decl
beginner
How to declare a variable size with value 877461 in Unity?
int size = 877461;
### Instruction: How to declare a variable size with value 877461 in Unity? ### Response: int size = 877461;
2,032,775
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 532917 в Unity?
int score = 532917;
### Instruction: Как объявить переменную score со значением 532917 в Unity? ### Response: int score = 532917;
66,660,784
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 246 простым.
function isPrime() { let n = 246; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 246 простым. ### Response: function isPrime() { let n = 246; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
43,893,767
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();
35,284,536
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();
87,239,671
ru
C++
string_ops
advanced
Напишите на 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; }
53,014,967
kk
C#
array_ops
advanced
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
82,378,020
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 188 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 188; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 188 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 188; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
74,001,202
kk
C#
logic_ops
advanced
C# тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
93,653,371
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; }
3,988,929
en
Python
var_decl
beginner
How to declare a variable limit with value 62263 in Python?
limit = 62263
### Instruction: How to declare a variable limit with value 62263 in Python? ### Response: limit = 62263
410,917
ru
Python
var_decl
beginner
Как объявить переменную index со значением 357923 в Python?
index = 357923
### Instruction: Как объявить переменную index со значением 357923 в Python? ### Response: index = 357923
51,525,931
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; }
52,611
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 9258.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9258));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 9258. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9258));
42,117,701
ru
Java
array_ops
intermediate
Напишите на 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,967,875
ru
C#
var_decl
beginner
Как объявить переменную result со значением 608594 в C#?
int result = 608594;
### Instruction: Как объявить переменную result со значением 608594 в C#? ### Response: int result = 608594;
79,190,326
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1902 високосным.
def is_leap(): year = 1902 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1902 високосным. ### Response: def is_leap(): year = 1902 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
10,904,896
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; }
87,138,458
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();
23,313,309
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(); }
43,195,492
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; }
67,225
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 6116.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6116))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 6116. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6116))
88,879,205
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 170 простым.
function isPrime() { let n = 170; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 170 простым. ### Response: function isPrime() { let n = 170; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
66,188,687
en
JavaScript
string_ops
advanced
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
786,642
kk
Python
factorial
advanced
Python тілінде 6571 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6571))
### Instruction: Python тілінде 6571 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6571))
2,412,373
en
Python
var_decl
beginner
How to declare a variable value with value 334994 in Python?
value = 334994
### Instruction: How to declare a variable value with value 334994 in Python? ### Response: value = 334994
88,708,696
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; }
117,978
kk
Java
factorial
advanced
Java тілінде 3081 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3081));
### Instruction: Java тілінде 3081 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3081));
95,277,900
kk
C++
logic_ops
intermediate
C++ тилінде 102 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 102 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,348,421
kk
JavaScript
var_decl
beginner
JavaScript тілінде 675417 мәнімен y айнымалысын қалай жариялауға болады?
let y = 675417;
### Instruction: JavaScript тілінде 675417 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 675417;
2,466,716
kk
Python
var_decl
beginner
Python тілінде 734471 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 734471
### Instruction: Python тілінде 734471 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 734471
65,973,523
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
41,104,020
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 5 простым.
public bool IsPrime() { int n = 5; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 5 простым. ### Response: public bool IsPrime() { int n = 5; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,740,206
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 640151 в C++?
int amount = 640151;
### Instruction: Как объявить переменную amount со значением 640151 в C++? ### Response: int amount = 640151;
182,997
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 7598.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7598))
### Instruction: Write a function in Python that sums numbers from 1 to 7598. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7598))
3,193,646
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 798609 in JavaScript?
let limit = 798609;
### Instruction: How to declare a variable limit with value 798609 in JavaScript? ### Response: let limit = 798609;
45,826,517
en
C++
logic_ops
intermediate
Write a function that determines if the number 482 is prime in C++.
public bool IsPrime() { int n = 482; 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 482 is prime in C++. ### Response: public bool IsPrime() { int n = 482; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
76,897
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 7805.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7805)); }
### Instruction: Write a function in Unity that calculates the factorial of 7805. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7805)); }
54,886,199
en
Python
logic_ops
advanced
Write a function that determines if the number 274 is prime in Python.
def is_prime(): n = 274 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 274 is prime in Python. ### Response: def is_prime(): n = 274 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
50,934,700
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
23,774,859
kk
Python
logic_ops
advanced
Python тилінде 49 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 49 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 49 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 49 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
68,349,444
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; }
21,965,976
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
91,612
en
C#
var_decl
beginner
How to declare a variable weight with value 35837 in C#?
int weight = 35837;
### Instruction: How to declare a variable weight with value 35837 in C#? ### Response: int weight = 35837;
1,553,532
en
Python
var_decl
beginner
How to declare a variable data with value 480851 in Python?
data = 480851
### Instruction: How to declare a variable data with value 480851 in Python? ### Response: data = 480851
2,569,945
kk
Unity
var_decl
beginner
Unity тілінде 559307 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 559307;
### Instruction: Unity тілінде 559307 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 559307;
3,465,591
kk
C++
var_decl
beginner
C++ тілінде 300654 мәнімен value айнымалысын қалай жариялауға болады?
int value = 300654;
### Instruction: C++ тілінде 300654 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 300654;
68,040,420
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 481 is prime in JavaScript.
function isPrime() { let n = 481; 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 481 is prime in JavaScript. ### Response: function isPrime() { let n = 481; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,278,398
en
C++
var_decl
beginner
How to declare a variable value with value 414815 in C++?
int value = 414815;
### Instruction: How to declare a variable value with value 414815 in C++? ### Response: int value = 414815;
27,213,595
ru
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,419,914
kk
Python
var_decl
beginner
Python тілінде 619137 мәнімен x айнымалысын қалай жариялауға болады?
x = 619137
### Instruction: Python тілінде 619137 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 619137
84,510,644
kk
C#
logic_ops
advanced
C# тилінде 1951 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1951 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,096,892
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2042 високосным.
function isLeap() { let y = 2042; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2042 високосным. ### Response: function isLeap() { let y = 2042; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
15,078,620
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
61,297,238
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
55,580,715
kk
Unity
logic_ops
advanced
Unity тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,448,259
en
Unity
var_decl
beginner
How to declare a variable total with value 958447 in Unity?
int total = 958447;
### Instruction: How to declare a variable total with value 958447 in Unity? ### Response: int total = 958447;
86,121,843
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); }
1,610,997
ru
C++
var_decl
beginner
Как объявить переменную level со значением 449132 в C++?
int level = 449132;
### Instruction: Как объявить переменную level со значением 449132 в C++? ### Response: int level = 449132;
44,270,891
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; }
1,303,394
ru
C++
var_decl
beginner
Как объявить переменную y со значением 497465 в C++?
int y = 497465;
### Instruction: Как объявить переменную y со значением 497465 в C++? ### Response: int y = 497465;
1,116,105
ru
Python
var_decl
beginner
Как объявить переменную score со значением 586267 в Python?
score = 586267
### Instruction: Как объявить переменную score со значением 586267 в Python? ### Response: score = 586267
21,032,779
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); }
2,382,492
kk
Unity
var_decl
beginner
Unity тілінде 396950 мәнімен y айнымалысын қалай жариялауға болады?
int y = 396950;
### Instruction: Unity тілінде 396950 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 396950;
81,264,971
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; }
21,663,594
en
Python
logic_ops
advanced
Write a function that determines if the number 356 is prime in Python.
def is_prime(): n = 356 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 356 is prime in Python. ### Response: def is_prime(): n = 356 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
88,503,274
en
C#
array_ops
advanced
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; }
49,074,723
en
Python
logic_ops
advanced
Write a function that determines if the number 475 is prime in Python.
def is_prime(): n = 475 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 475 is prime in Python. ### Response: def is_prime(): n = 475 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
29,736,401
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; }
2,340,123
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 931148 в JavaScript?
let health = 931148;
### Instruction: Как объявить переменную health со значением 931148 в JavaScript? ### Response: let health = 931148;
69,819,628
en
Python
string_ops
intermediate
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()
187,262
kk
Unity
factorial
advanced
Unity тілінде 3445 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3445)); }
### Instruction: Unity тілінде 3445 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3445)); }
2,654,366
en
Python
var_decl
beginner
How to declare a variable x with value 182638 in Python?
x = 182638
### Instruction: How to declare a variable x with value 182638 in Python? ### Response: x = 182638
29,501,557
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(); }
30,799,474
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,282,962
ru
C#
var_decl
beginner
Как объявить переменную limit со значением 908585 в C#?
int limit = 908585;
### Instruction: Как объявить переменную limit со значением 908585 в C#? ### Response: int limit = 908585;
74,765,372
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); }
3,491,195
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 739925 in JavaScript?
let speed = 739925;
### Instruction: How to declare a variable speed with value 739925 in JavaScript? ### Response: let speed = 739925;
2,689,896
en
C++
var_decl
beginner
How to declare a variable size with value 527451 in C++?
int size = 527451;
### Instruction: How to declare a variable size with value 527451 in C++? ### Response: int size = 527451;
28,068,357
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
32,344,545
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);
3,700,066
kk
Java
var_decl
beginner
Java тілінде 686617 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 686617;
### Instruction: Java тілінде 686617 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 686617;
92,606,063
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
646,597
kk
JavaScript
var_decl
beginner
JavaScript тілінде 397471 мәнімен level айнымалысын қалай жариялауға болады?
let level = 397471;
### Instruction: JavaScript тілінде 397471 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 397471;
45,495,945
kk
Python
array_ops
intermediate
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
1,091,655
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 818220 в C++?
int amount = 818220;
### Instruction: Как объявить переменную amount со значением 818220 в C++? ### Response: int amount = 818220;
1,823,594
en
Unity
var_decl
beginner
How to declare a variable buffer with value 8722 in Unity?
int buffer = 8722;
### Instruction: How to declare a variable buffer with value 8722 in Unity? ### Response: int buffer = 8722;
4,270,134
kk
JavaScript
var_decl
beginner
JavaScript тілінде 390079 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 390079;
### Instruction: JavaScript тілінде 390079 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 390079;
97,940,760
kk
Java
logic_ops
intermediate
Java тилінде 81 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 81; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 81 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 81; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
875,966
kk
JavaScript
var_decl
beginner
JavaScript тілінде 124571 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 124571;
### Instruction: JavaScript тілінде 124571 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 124571;