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 |
|---|---|---|---|---|---|---|---|
4,555,105 | ru | Java | var_decl | beginner | Как объявить переменную value со значением 525395 в Java? | int value = 525395; | ### Instruction:
Как объявить переменную value со значением 525395 в Java?
### Response:
int value = 525395; |
68,756,355 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
761,903 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 7853. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7853));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 7853.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7853));
} |
54,614,080 | kk | Unity | logic_ops | advanced | Unity тилінде 467 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 467;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 467 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 467;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
42,575,135 | en | JavaScript | array_ops | advanced | 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(); |
28,955,240 | kk | Unity | string_ops | advanced | Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
11,517,105 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1972 is a leap year in C++. | public bool IsLeap() {
int y = 1972;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1972 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1972;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,784,386 | ru | Python | var_decl | beginner | Как объявить переменную y со значением 295920 в Python? | y = 295920 | ### Instruction:
Как объявить переменную y со значением 295920 в Python?
### Response:
y = 295920 |
181,567 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 60784 в JavaScript? | let index = 60784; | ### Instruction:
Как объявить переменную index со значением 60784 в JavaScript?
### Response:
let index = 60784; |
68,769,675 | en | Python | string_ops | advanced | 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] |
2,706,862 | en | Unity | var_decl | beginner | How to declare a variable health with value 833847 in Unity? | int health = 833847; | ### Instruction:
How to declare a variable health with value 833847 in Unity?
### Response:
int health = 833847; |
54,277,045 | en | Unity | array_ops | intermediate | Write a function that filters only even numbers from a list in 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:
Write a function that filters only even numbers from a list in 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;
} |
24,209,533 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
1,613,987 | ru | C# | var_decl | beginner | Как объявить переменную timer со значением 8243 в C#? | int timer = 8243; | ### Instruction:
Как объявить переменную timer со значением 8243 в C#?
### Response:
int timer = 8243; |
4,724,347 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 72396 in JavaScript? | let limit = 72396; | ### Instruction:
How to declare a variable limit with value 72396 in JavaScript?
### Response:
let limit = 72396; |
88,109,802 | 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;
} |
59,151,861 | kk | Python | logic_ops | intermediate | Python тилінде 1959 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1959
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1959 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1959
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,512,611 | en | Java | var_decl | beginner | How to declare a variable size with value 275652 in Java? | int size = 275652; | ### Instruction:
How to declare a variable size with value 275652 in Java?
### Response:
int size = 275652; |
41,333,801 | 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;
} |
26,849,510 | en | Java | array_ops | intermediate | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
42,872,389 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 428 is prime in JavaScript. | function isPrime() {
let n = 428;
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 428 is prime in JavaScript.
### Response:
function isPrime() {
let n = 428;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,946,732 | en | C# | var_decl | beginner | How to declare a variable weight with value 735342 in C#? | int weight = 735342; | ### Instruction:
How to declare a variable weight with value 735342 in C#?
### Response:
int weight = 735342; |
20,361,131 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 1985 високосным. | public bool IsLeap() {
int y = 1985;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1985 високосным.
### Response:
public bool IsLeap() {
int y = 1985;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
776,787 | kk | C++ | var_decl | beginner | C++ тілінде 326549 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 326549; | ### Instruction:
C++ тілінде 326549 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 326549; |
3,516,933 | ru | JavaScript | var_decl | beginner | Как объявить переменную count со значением 736492 в JavaScript? | let count = 736492; | ### Instruction:
Как объявить переменную count со значением 736492 в JavaScript?
### Response:
let count = 736492; |
3,773,881 | kk | C# | var_decl | beginner | C# тілінде 479175 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 479175; | ### Instruction:
C# тілінде 479175 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 479175; |
86,608,677 | en | Python | array_ops | intermediate | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
89,611,521 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
1,974,774 | en | Unity | var_decl | beginner | How to declare a variable score with value 962594 in Unity? | int score = 962594; | ### Instruction:
How to declare a variable score with value 962594 in Unity?
### Response:
int score = 962594; |
17,457,096 | 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;
} |
2,492,094 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 503391 в Python? | score = 503391 | ### Instruction:
Как объявить переменную score со значением 503391 в Python?
### Response:
score = 503391 |
26,718,623 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
88,409,813 | kk | Python | logic_ops | intermediate | Python тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1990
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1990
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
75,287,558 | ru | Java | string_ops | advanced | Напишите на 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;
} |
1,959,447 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 622961 мәнімен size айнымалысын қалай жариялауға болады? | let size = 622961; | ### Instruction:
JavaScript тілінде 622961 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
let size = 622961; |
2,818,261 | en | Unity | var_decl | beginner | How to declare a variable timer with value 846548 in Unity? | int timer = 846548; | ### Instruction:
How to declare a variable timer with value 846548 in Unity?
### Response:
int timer = 846548; |
51,672,271 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,603,212 | kk | C++ | var_decl | beginner | C++ тілінде 452040 мәнімен count айнымалысын қалай жариялауға болады? | int count = 452040; | ### Instruction:
C++ тілінде 452040 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 452040; |
86,998,229 | kk | C# | logic_ops | advanced | 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;
} |
87,565,893 | kk | Python | logic_ops | intermediate | Python тилінде 1931 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1931
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1931 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1931
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,456,558 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 9516-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(9516) << std::endl; | ### Instruction:
C++ тілінде 1-ден 9516-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(9516) << std::endl; |
42,841,537 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
23,905,663 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2016 високосным. | public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2016 високосным.
### Response:
public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,411,126 | ru | Unity | var_decl | beginner | Как объявить переменную size со значением 82308 в Unity? | int size = 82308; | ### Instruction:
Как объявить переменную size со значением 82308 в Unity?
### Response:
int size = 82308; |
1,136,501 | en | Unity | var_decl | beginner | How to declare a variable rate with value 598893 in Unity? | int rate = 598893; | ### Instruction:
How to declare a variable rate with value 598893 in Unity?
### Response:
int rate = 598893; |
3,769,097 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 71372 мәнімен amount айнымалысын қалай жариялауға болады? | let amount = 71372; | ### Instruction:
JavaScript тілінде 71372 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
let amount = 71372; |
45,225,271 | kk | C++ | logic_ops | intermediate | C++ тилінде 2040 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2040 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
920,980 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 9042. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9042));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 9042.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9042));
} |
232,958 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 2242. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2242));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 2242.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2242));
} |
53,117,204 | ru | C# | array_ops | advanced | Напишите на 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;
} |
98,037,402 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
2,786,603 | ru | Unity | var_decl | beginner | Как объявить переменную health со значением 852059 в Unity? | int health = 852059; | ### Instruction:
Как объявить переменную health со значением 852059 в Unity?
### Response:
int health = 852059; |
21,300,913 | en | Python | string_ops | advanced | 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] |
4,287,385 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 188661 в JavaScript? | let rate = 188661; | ### Instruction:
Как объявить переменную rate со значением 188661 в JavaScript?
### Response:
let rate = 188661; |
61,706,258 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
13,617,549 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
1,854,494 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 356051 мәнімен buffer айнымалысын қалай жариялауға болады? | let buffer = 356051; | ### Instruction:
JavaScript тілінде 356051 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
let buffer = 356051; |
62,805,707 | en | C# | array_ops | intermediate | Write a function that filters only even numbers from a list in C#. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C#.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
4,433,981 | ru | Python | var_decl | beginner | Как объявить переменную total со значением 848349 в Python? | total = 848349 | ### Instruction:
Как объявить переменную total со значением 848349 в Python?
### Response:
total = 848349 |
52,108,166 | kk | C# | logic_ops | intermediate | C# тилінде 466 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 466;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 466 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 466;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
67,620,331 | en | Java | logic_ops | intermediate | Write logic to check if the year 1926 is a leap year in Java. | public bool IsLeap() {
int y = 1926;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1926 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1926;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
35,946,031 | en | C# | string_ops | intermediate | Write a function that converts a string to uppercase in C#. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in C#.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,606,398 | kk | Python | var_decl | beginner | Python тілінде 400774 мәнімен total айнымалысын қалай жариялауға болады? | total = 400774 | ### Instruction:
Python тілінде 400774 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
total = 400774 |
2,680,436 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 409890 в C#? | int rate = 409890; | ### Instruction:
Как объявить переменную rate со значением 409890 в C#?
### Response:
int rate = 409890; |
19,608,502 | en | JavaScript | string_ops | intermediate | 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(''); |
207,271 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 6171. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(6171)) | ### Instruction:
Write a function in Python that calculates the factorial of 6171.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(6171)) |
12,422,014 | 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(); |
3,782,117 | ru | Python | var_decl | beginner | Как объявить переменную value со значением 528407 в Python? | value = 528407 | ### Instruction:
Как объявить переменную value со значением 528407 в Python?
### Response:
value = 528407 |
3,258,731 | kk | Python | var_decl | beginner | Python тілінде 905897 мәнімен result айнымалысын қалай жариялауға болады? | result = 905897 | ### Instruction:
Python тілінде 905897 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
result = 905897 |
1,496,973 | en | C++ | var_decl | beginner | How to declare a variable y with value 895634 in C++? | int y = 895634; | ### Instruction:
How to declare a variable y with value 895634 in C++?
### Response:
int y = 895634; |
16,701,407 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
78,709,881 | kk | Unity | logic_ops | advanced | Unity тилінде 244 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 244;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 244 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 244;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,895,969 | ru | Unity | var_decl | beginner | Как объявить переменную level со значением 121766 в Unity? | int level = 121766; | ### Instruction:
Как объявить переменную level со значением 121766 в Unity?
### Response:
int level = 121766; |
4,938,508 | en | C++ | var_decl | beginner | How to declare a variable rate with value 92485 in C++? | int rate = 92485; | ### Instruction:
How to declare a variable rate with value 92485 in C++?
### Response:
int rate = 92485; |
60,963,592 | kk | C# | logic_ops | advanced | C# тилінде 248 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 248;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 248 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 248;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
15,742,206 | en | Python | logic_ops | intermediate | Write a function that determines if the number 84 is prime in Python. | def is_prime():
n = 84
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 84 is prime in Python.
### Response:
def is_prime():
n = 84
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
157,149 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 258. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(258)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 258.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(258)); |
90,011 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 2199. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2199));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 2199.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2199));
} |
82,310,206 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 118 is prime in JavaScript. | function isPrime() {
let n = 118;
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 118 is prime in JavaScript.
### Response:
function isPrime() {
let n = 118;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
54,593,080 | en | Java | logic_ops | advanced | Write logic to check if the year 2081 is a leap year in Java. | public bool IsLeap() {
int y = 2081;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2081 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2081;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,773,383 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 648128 в Python? | score = 648128 | ### Instruction:
Как объявить переменную score со значением 648128 в Python?
### Response:
score = 648128 |
45,792,503 | en | C++ | string_ops | intermediate | Write a function that checks if a string is a palindrome in C++. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in C++.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
1,952,907 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 338914 в Unity? | int amount = 338914; | ### Instruction:
Как объявить переменную amount со значением 338914 в Unity?
### Response:
int amount = 338914; |
36,598,542 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Java функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
76,411,864 | en | Python | array_ops | intermediate | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
90,651,650 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 1989 високосным. | public bool IsLeap() {
int y = 1989;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1989 високосным.
### Response:
public bool IsLeap() {
int y = 1989;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
77,759,486 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 93 простым. | public bool IsPrime() {
int n = 93;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 93 простым.
### Response:
public bool IsPrime() {
int n = 93;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,295,650 | ru | C# | var_decl | beginner | Как объявить переменную score со значением 788894 в C#? | int score = 788894; | ### Instruction:
Как объявить переменную score со значением 788894 в C#?
### Response:
int score = 788894; |
77,136,108 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
54,755 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 2857. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2857)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 2857.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2857)) |
93,536,805 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 1955 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1955;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1955 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1955;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
53,464,687 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
67,141,968 | 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;
} |
74,610,291 | en | Python | string_ops | advanced | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
2,596,872 | en | Unity | var_decl | beginner | How to declare a variable rate with value 921215 in Unity? | int rate = 921215; | ### Instruction:
How to declare a variable rate with value 921215 in Unity?
### Response:
int rate = 921215; |
77,244,982 | kk | Java | string_ops | advanced | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
21,065,009 | kk | Unity | array_ops | intermediate | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
56,343,413 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
179,963 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 9142. | 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(9142) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 9142.
### 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(9142) << std::endl; |
1,704,617 | en | Python | var_decl | beginner | How to declare a variable rate with value 805658 in Python? | rate = 805658 | ### Instruction:
How to declare a variable rate with value 805658 in Python?
### Response:
rate = 805658 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.