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
75,030,783
en
Python
string_ops
intermediate
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
84,879,796
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
4,122,609
kk
JavaScript
var_decl
beginner
JavaScript тілінде 565997 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 565997;
### Instruction: JavaScript тілінде 565997 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 565997;
4,245,945
en
Java
var_decl
beginner
How to declare a variable count with value 908359 in Java?
int count = 908359;
### Instruction: How to declare a variable count with value 908359 in Java? ### Response: int count = 908359;
2,643,801
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 912298 in JavaScript?
let offset = 912298;
### Instruction: How to declare a variable offset with value 912298 in JavaScript? ### Response: let offset = 912298;
75,715,324
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
4,170,977
kk
Unity
var_decl
beginner
Unity тілінде 834902 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 834902;
### Instruction: Unity тілінде 834902 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 834902;
25,874,303
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('');
4,077,360
en
C#
var_decl
beginner
How to declare a variable weight with value 574869 in C#?
int weight = 574869;
### Instruction: How to declare a variable weight with value 574869 in C#? ### Response: int weight = 574869;
1,171,764
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 461237 in JavaScript?
let speed = 461237;
### Instruction: How to declare a variable speed with value 461237 in JavaScript? ### Response: let speed = 461237;
826,282
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 5154-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5154)); }
### Instruction: Unity тілінде 1-ден 5154-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5154)); }
86,358,650
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
35,941,768
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; }
64,976,045
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; }
31,771,313
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; }
997,687
ru
JavaScript
var_decl
beginner
Как объявить переменную result со значением 317602 в JavaScript?
let result = 317602;
### Instruction: Как объявить переменную result со значением 317602 в JavaScript? ### Response: let result = 317602;
27,284,562
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
4,259,872
en
Unity
var_decl
beginner
How to declare a variable limit with value 929972 in Unity?
int limit = 929972;
### Instruction: How to declare a variable limit with value 929972 in Unity? ### Response: int limit = 929972;
48,102,808
kk
Python
logic_ops
advanced
Python тилінде 2009 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2009 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2009 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2009 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,653,983
kk
Java
var_decl
beginner
Java тілінде 772889 мәнімен total айнымалысын қалай жариялауға болады?
int total = 772889;
### Instruction: Java тілінде 772889 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 772889;
89,720,200
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
88,464,713
kk
Unity
logic_ops
advanced
Unity тилінде 2052 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2052 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
90,172
kk
Java
factorial
advanced
Java тілінде 9464 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9464));
### Instruction: Java тілінде 9464 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9464));
3,726,113
en
Python
var_decl
beginner
How to declare a variable level with value 834630 in Python?
level = 834630
### Instruction: How to declare a variable level with value 834630 in Python? ### Response: level = 834630
2,869,405
en
Java
var_decl
beginner
How to declare a variable weight with value 331118 in Java?
int weight = 331118;
### Instruction: How to declare a variable weight with value 331118 in Java? ### Response: int weight = 331118;
217,488
kk
Python
sum_n
intermediate
Python тілінде 1-ден 8863-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8863))
### Instruction: Python тілінде 1-ден 8863-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8863))
4,452,429
en
Java
var_decl
beginner
How to declare a variable size with value 625293 in Java?
int size = 625293;
### Instruction: How to declare a variable size with value 625293 in Java? ### Response: int size = 625293;
90,450,966
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 215 простым.
public bool IsPrime() { int n = 215; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 215 простым. ### Response: public bool IsPrime() { int n = 215; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,877,714
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 246 простым.
public bool IsPrime() { int n = 246; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 246 простым. ### Response: public bool IsPrime() { int n = 246; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
299,706
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 1870-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1870));
### Instruction: JavaScript тілінде 1-ден 1870-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1870));
84,478,672
kk
Java
logic_ops
advanced
Java тилінде 2065 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2065; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2065 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2065; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
15,852,933
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
4,868,746
kk
C++
var_decl
beginner
C++ тілінде 389152 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 389152;
### Instruction: C++ тілінде 389152 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 389152;
14,956,033
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; }
2,481,142
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 751657 в JavaScript?
let size = 751657;
### Instruction: Как объявить переменную size со значением 751657 в JavaScript? ### Response: let size = 751657;
99,827,069
kk
C#
logic_ops
advanced
C# тилінде 286 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 286; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 286 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 286; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,068,837
en
C++
var_decl
beginner
How to declare a variable offset with value 313651 in C++?
int offset = 313651;
### Instruction: How to declare a variable offset with value 313651 in C++? ### Response: int offset = 313651;
4,113,830
en
Python
var_decl
beginner
How to declare a variable result with value 732607 in Python?
result = 732607
### Instruction: How to declare a variable result with value 732607 in Python? ### Response: result = 732607
49,657
kk
C#
var_decl
beginner
C# тілінде 146762 мәнімен health айнымалысын қалай жариялауға болады?
int health = 146762;
### Instruction: C# тілінде 146762 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 146762;
2,604,403
en
Unity
var_decl
beginner
How to declare a variable offset with value 890788 in Unity?
int offset = 890788;
### Instruction: How to declare a variable offset with value 890788 in Unity? ### Response: int offset = 890788;
97,229,760
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]
4,804,264
ru
C#
var_decl
beginner
Как объявить переменную total со значением 137860 в C#?
int total = 137860;
### Instruction: Как объявить переменную total со значением 137860 в C#? ### Response: int total = 137860;
2,796,242
kk
C#
var_decl
beginner
C# тілінде 687129 мәнімен value айнымалысын қалай жариялауға болады?
int value = 687129;
### Instruction: C# тілінде 687129 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 687129;
78,462,002
ru
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; }
78,122,477
kk
C++
logic_ops
intermediate
C++ тилінде 319 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 319; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 319 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 319; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,487,112
en
Unity
var_decl
beginner
How to declare a variable timer with value 505748 in Unity?
int timer = 505748;
### Instruction: How to declare a variable timer with value 505748 in Unity? ### Response: int timer = 505748;
943,959
en
Python
var_decl
beginner
How to declare a variable result with value 547888 in Python?
result = 547888
### Instruction: How to declare a variable result with value 547888 in Python? ### Response: result = 547888
1,560,027
en
JavaScript
var_decl
beginner
How to declare a variable result with value 769053 in JavaScript?
let result = 769053;
### Instruction: How to declare a variable result with value 769053 in JavaScript? ### Response: let result = 769053;
98,258,838
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]
65,435,899
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 464 простым.
public bool IsPrime() { int n = 464; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 464 простым. ### Response: public bool IsPrime() { int n = 464; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,988,577
en
Python
logic_ops
intermediate
Write logic to check if the year 1927 is a leap year in Python.
def is_leap(): year = 1927 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1927 is a leap year in Python. ### Response: def is_leap(): year = 1927 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
59,576,106
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 458 простым.
public bool IsPrime() { int n = 458; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 458 простым. ### Response: public bool IsPrime() { int n = 458; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,354,373
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
39,764,817
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 382 простым.
public bool IsPrime() { int n = 382; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 382 простым. ### Response: public bool IsPrime() { int n = 382; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,585,607
kk
Unity
var_decl
beginner
Unity тілінде 573027 мәнімен health айнымалысын қалай жариялауға болады?
int health = 573027;
### Instruction: Unity тілінде 573027 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 573027;
75,061,624
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 328 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 328; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 328 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 328; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
94,562,666
en
JavaScript
array_ops
advanced
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);
16,856,605
en
Python
logic_ops
advanced
Write a function that determines if the number 200 is prime in Python.
def is_prime(): n = 200 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 200 is prime in Python. ### Response: def is_prime(): n = 200 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
33,800,122
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
45,126,852
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2042 високосным.
public bool IsLeap() { int y = 2042; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2042 високосным. ### Response: public bool IsLeap() { int y = 2042; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
330,026
kk
Python
sum_n
intermediate
Python тілінде 1-ден 3107-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3107))
### Instruction: Python тілінде 1-ден 3107-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3107))
10,444,369
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
69,047,136
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
59,494,064
kk
Python
logic_ops
intermediate
Python тилінде 256 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 256 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 256 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 256 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,323,344
en
Unity
var_decl
beginner
How to declare a variable speed with value 128822 in Unity?
int speed = 128822;
### Instruction: How to declare a variable speed with value 128822 in Unity? ### Response: int speed = 128822;
90,178,865
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 464 простым.
public bool IsPrime() { int n = 464; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 464 простым. ### Response: public bool IsPrime() { int n = 464; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
61,620,015
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 330 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 330; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 330 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 330; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
41,144,507
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]
14,958,664
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; }
49,079,511
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
38,873,596
en
C#
logic_ops
intermediate
Write a function that determines if the number 357 is prime in C#.
public bool IsPrime() { int n = 357; 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 357 is prime in C#. ### Response: public bool IsPrime() { int n = 357; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
526,115
kk
Python
var_decl
beginner
Python тілінде 716396 мәнімен score айнымалысын қалай жариялауға болады?
score = 716396
### Instruction: Python тілінде 716396 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 716396
818,854
ru
Java
var_decl
beginner
Как объявить переменную data со значением 29864 в Java?
int data = 29864;
### Instruction: Как объявить переменную data со значением 29864 в Java? ### Response: int data = 29864;
36,982,277
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(); }
14,379,037
en
Unity
string_ops
advanced
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(); }
1,758,072
en
C#
var_decl
beginner
How to declare a variable level with value 586458 in C#?
int level = 586458;
### Instruction: How to declare a variable level with value 586458 in C#? ### Response: int level = 586458;
50,159,707
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; }
3,948,870
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 101559 в C#?
int timer = 101559;
### Instruction: Как объявить переменную timer со значением 101559 в C#? ### Response: int timer = 101559;
16,418,848
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,423,532
en
Python
var_decl
beginner
How to declare a variable x with value 939750 in Python?
x = 939750
### Instruction: How to declare a variable x with value 939750 in Python? ### Response: x = 939750
1,971,471
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 446406 in JavaScript?
let speed = 446406;
### Instruction: How to declare a variable speed with value 446406 in JavaScript? ### Response: let speed = 446406;
2,112,768
en
C++
var_decl
beginner
How to declare a variable x with value 503629 in C++?
int x = 503629;
### Instruction: How to declare a variable x with value 503629 in C++? ### Response: int x = 503629;
56,928,832
kk
C++
logic_ops
advanced
C++ тилінде 1917 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1917 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
27,809,599
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; }
373,642
kk
Java
factorial
advanced
Java тілінде 9597 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9597));
### Instruction: Java тілінде 9597 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9597));
11,343,270
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
42,921,935
kk
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; }
73,347,425
kk
Unity
string_ops
advanced
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,459,418
kk
Python
var_decl
beginner
Python тілінде 423516 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 423516
### Instruction: Python тілінде 423516 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 423516
1,942,191
kk
C#
var_decl
beginner
C# тілінде 652030 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 652030;
### Instruction: C# тілінде 652030 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 652030;
84,743,004
en
C++
string_ops
advanced
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
14,679,190
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; }
3,981,666
ru
C++
var_decl
beginner
Как объявить переменную level со значением 822182 в C++?
int level = 822182;
### Instruction: Как объявить переменную level со значением 822182 в C++? ### Response: int level = 822182;
4,546,420
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 520713 in JavaScript?
let offset = 520713;
### Instruction: How to declare a variable offset with value 520713 in JavaScript? ### Response: let offset = 520713;
88,887,753
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; }
59,363,729
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,252,642
ru
C#
var_decl
beginner
Как объявить переменную y со значением 413499 в C#?
int y = 413499;
### Instruction: Как объявить переменную y со значением 413499 в C#? ### Response: int y = 413499;
47,565,625
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
1,742,850
en
C#
var_decl
beginner
How to declare a variable value with value 540376 in C#?
int value = 540376;
### Instruction: How to declare a variable value with value 540376 in C#? ### Response: int value = 540376;
167,412
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 7469-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7469));
### Instruction: JavaScript тілінде 1-ден 7469-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7469));