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,703,945 | en | Python | var_decl | beginner | How to declare a variable weight with value 492820 in Python? | weight = 492820 | ### Instruction:
How to declare a variable weight with value 492820 in Python?
### Response:
weight = 492820 |
958,125 | kk | Unity | factorial | advanced | Unity тілінде 9724 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9724));
} | ### Instruction:
Unity тілінде 9724 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9724));
} |
84,708,401 | kk | Java | logic_ops | advanced | Java тилінде 2098 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2098;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2098 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2098;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,928,382 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 529642 мәнімен x айнымалысын қалай жариялауға болады? | let x = 529642; | ### Instruction:
JavaScript тілінде 529642 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
let x = 529642; |
1,535,490 | ru | JavaScript | var_decl | beginner | Как объявить переменную offset со значением 685305 в JavaScript? | let offset = 685305; | ### Instruction:
Как объявить переменную offset со значением 685305 в JavaScript?
### Response:
let offset = 685305; |
3,657,824 | en | Java | var_decl | beginner | How to declare a variable total with value 780989 in Java? | int total = 780989; | ### Instruction:
How to declare a variable total with value 780989 in Java?
### Response:
int total = 780989; |
76,121,847 | en | Python | logic_ops | advanced | Write a function that determines if the number 241 is prime in Python. | def is_prime():
n = 241
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 241 is prime in Python.
### Response:
def is_prime():
n = 241
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
3,479,596 | ru | Python | var_decl | beginner | Как объявить переменную speed со значением 279263 в Python? | speed = 279263 | ### Instruction:
Как объявить переменную speed со значением 279263 в Python?
### Response:
speed = 279263 |
4,544,702 | kk | Python | var_decl | beginner | Python тілінде 766900 мәнімен total айнымалысын қалай жариялауға болады? | total = 766900 | ### Instruction:
Python тілінде 766900 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
total = 766900 |
57,112,892 | 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;
} |
23,649,492 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 181 простым. | public bool IsPrime() {
int n = 181;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 181 простым.
### Response:
public bool IsPrime() {
int n = 181;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,257,103 | kk | C# | var_decl | beginner | C# тілінде 353020 мәнімен x айнымалысын қалай жариялауға болады? | int x = 353020; | ### Instruction:
C# тілінде 353020 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 353020; |
98,004,310 | en | Python | logic_ops | intermediate | Write logic to check if the year 2027 is a leap year in Python. | def is_leap():
year = 2027
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2027 is a leap year in Python.
### Response:
def is_leap():
year = 2027
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
19,065,915 | kk | Python | string_ops | advanced | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
54,227,374 | ru | 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;
} |
31,544,144 | 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();
} |
1,990,572 | kk | Java | var_decl | beginner | Java тілінде 577124 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 577124; | ### Instruction:
Java тілінде 577124 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 577124; |
58,379,248 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1904 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1904;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1904 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1904;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
61,510,389 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
56,990,478 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
3,063,295 | kk | Python | var_decl | beginner | Python тілінде 146695 мәнімен index айнымалысын қалай жариялауға болады? | index = 146695 | ### Instruction:
Python тілінде 146695 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 146695 |
372,881 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 6545-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6545)) | ### Instruction:
Python тілінде 1-ден 6545-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6545)) |
2,622,218 | en | JavaScript | var_decl | beginner | How to declare a variable health with value 131261 in JavaScript? | let health = 131261; | ### Instruction:
How to declare a variable health with value 131261 in JavaScript?
### Response:
let health = 131261; |
35,353,224 | 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;
} |
2,584,291 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 381589 в C++? | int y = 381589; | ### Instruction:
Как объявить переменную y со значением 381589 в C++?
### Response:
int y = 381589; |
64,847,592 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 68 простым. | def is_prime():
n = 68
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 68 простым.
### Response:
def is_prime():
n = 68
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
49,142,559 | 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);
} |
15,035,031 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 174 простым. | public bool IsPrime() {
int n = 174;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 174 простым.
### Response:
public bool IsPrime() {
int n = 174;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
49,414,543 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
1,057,724 | kk | Unity | var_decl | beginner | Unity тілінде 805032 мәнімен result айнымалысын қалай жариялауға болады? | int result = 805032; | ### Instruction:
Unity тілінде 805032 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 805032; |
30,774,958 | ru | Python | array_ops | advanced | Напишите на 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] |
12,255,865 | en | Java | logic_ops | advanced | Write a function that determines if the number 288 is prime in Java. | public bool IsPrime() {
int n = 288;
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 288 is prime in Java.
### Response:
public bool IsPrime() {
int n = 288;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,449,364 | kk | Python | var_decl | beginner | Python тілінде 700102 мәнімен y айнымалысын қалай жариялауға болады? | y = 700102 | ### Instruction:
Python тілінде 700102 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
y = 700102 |
81,686,135 | 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();
} |
42,655,578 | 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(); |
29,543,256 | ru | 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;
} |
55,236,843 | ru | 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);
} |
37,375,013 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 1986 високосным. | public bool IsLeap() {
int y = 1986;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1986 високосным.
### Response:
public bool IsLeap() {
int y = 1986;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
18,517,028 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
4,708,192 | en | JavaScript | var_decl | beginner | How to declare a variable timer with value 607017 in JavaScript? | let timer = 607017; | ### Instruction:
How to declare a variable timer with value 607017 in JavaScript?
### Response:
let timer = 607017; |
32,157,200 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 1991 високосным. | public bool IsLeap() {
int y = 1991;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1991 високосным.
### Response:
public bool IsLeap() {
int y = 1991;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
94,912,992 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
2,053,195 | en | Python | var_decl | beginner | How to declare a variable limit with value 24013 in Python? | limit = 24013 | ### Instruction:
How to declare a variable limit with value 24013 in Python?
### Response:
limit = 24013 |
1,288,155 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 485053 in JavaScript? | let speed = 485053; | ### Instruction:
How to declare a variable speed with value 485053 in JavaScript?
### Response:
let speed = 485053; |
3,460,051 | ru | C# | var_decl | beginner | Как объявить переменную count со значением 953565 в C#? | int count = 953565; | ### Instruction:
Как объявить переменную count со значением 953565 в C#?
### Response:
int count = 953565; |
26,640,095 | ru | C# | array_ops | intermediate | Напишите на C# функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C# функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
43,926 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 3124. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3124)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 3124.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3124)); |
18,437,998 | en | Unity | array_ops | intermediate | Write a function that reverses a list in Unity. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Unity.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
47,708,175 | en | Java | string_ops | intermediate | 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;
} |
8,244 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 6349. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6349));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 6349.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6349));
} |
1,396,681 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 920451 in JavaScript? | let total = 920451; | ### Instruction:
How to declare a variable total with value 920451 in JavaScript?
### Response:
let total = 920451; |
3,532,475 | kk | Unity | var_decl | beginner | Unity тілінде 227722 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 227722; | ### Instruction:
Unity тілінде 227722 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 227722; |
23,107,461 | en | C# | array_ops | intermediate | Write a function that reverses a list in C#. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C#.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
81,499,698 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 1982 високосным. | public bool IsLeap() {
int y = 1982;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1982 високосным.
### Response:
public bool IsLeap() {
int y = 1982;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,026,613 | kk | Python | var_decl | beginner | Python тілінде 343797 мәнімен index айнымалысын қалай жариялауға болады? | index = 343797 | ### Instruction:
Python тілінде 343797 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 343797 |
3,116,756 | en | JavaScript | var_decl | beginner | How to declare a variable value with value 215082 in JavaScript? | let value = 215082; | ### Instruction:
How to declare a variable value with value 215082 in JavaScript?
### Response:
let value = 215082; |
43,796,455 | en | Unity | array_ops | intermediate | Write a function that finds the maximum number in an array in Unity. | 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 Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
66,572,550 | 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;
} |
4,050,227 | ru | C# | var_decl | beginner | Как объявить переменную x со значением 912244 в C#? | int x = 912244; | ### Instruction:
Как объявить переменную x со значением 912244 в C#?
### Response:
int x = 912244; |
1,427,924 | en | Java | var_decl | beginner | How to declare a variable amount with value 428113 in Java? | int amount = 428113; | ### Instruction:
How to declare a variable amount with value 428113 in Java?
### Response:
int amount = 428113; |
73,484,897 | 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);
} |
23,540,100 | 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;
} |
50,545,730 | kk | C# | logic_ops | advanced | C# тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 14;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 14;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
48,362,681 | en | C++ | array_ops | intermediate | Write a function that reverses a list in C++. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C++.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
69,234,818 | en | Java | array_ops | advanced | Write a function that finds the maximum number in an array in Java. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
73,459,809 | 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();
} |
59,149,012 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 485 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 485;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 485 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 485;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
40,690,058 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
71,039,181 | 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] |
34,239,080 | en | Unity | string_ops | advanced | Write a function that counts vowels in a text in Unity. | 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 Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
58,186,118 | kk | C++ | logic_ops | intermediate | C++ тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1938;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1938;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
23,160,070 | 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(''); |
1,451,521 | en | C# | var_decl | beginner | How to declare a variable y with value 374439 in C#? | int y = 374439; | ### Instruction:
How to declare a variable y with value 374439 in C#?
### Response:
int y = 374439; |
854,560 | ru | JavaScript | var_decl | beginner | Как объявить переменную y со значением 888475 в JavaScript? | let y = 888475; | ### Instruction:
Как объявить переменную y со значением 888475 в JavaScript?
### Response:
let y = 888475; |
49,357,305 | 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); |
54,012,267 | en | Java | logic_ops | advanced | Write logic to check if the year 2097 is a leap year in Java. | public bool IsLeap() {
int y = 2097;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2097 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2097;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,133,027 | en | C# | var_decl | beginner | How to declare a variable speed with value 187119 in C#? | int speed = 187119; | ### Instruction:
How to declare a variable speed with value 187119 in C#?
### Response:
int speed = 187119; |
67,320,336 | en | Unity | array_ops | advanced | 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;
} |
416,887 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 2700. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2700)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 2700.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2700)) |
93,411,385 | 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();
} |
31,297,541 | 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;
} |
19,956,697 | 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;
} |
1,557,310 | ru | Python | var_decl | beginner | Как объявить переменную timer со значением 510034 в Python? | timer = 510034 | ### Instruction:
Как объявить переменную timer со значением 510034 в Python?
### Response:
timer = 510034 |
2,421,916 | ru | JavaScript | var_decl | beginner | Как объявить переменную size со значением 705231 в JavaScript? | let size = 705231; | ### Instruction:
Как объявить переменную size со значением 705231 в JavaScript?
### Response:
let size = 705231; |
4,573,191 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 813586 мәнімен speed айнымалысын қалай жариялауға болады? | let speed = 813586; | ### Instruction:
JavaScript тілінде 813586 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
let speed = 813586; |
264,788 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 3794. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3794)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 3794.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3794)); |
40,520,407 | kk | C# | string_ops | intermediate | C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
3,051,423 | kk | Python | var_decl | beginner | Python тілінде 317579 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 317579 | ### Instruction:
Python тілінде 317579 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 317579 |
2,847,835 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 968291 в C++? | int health = 968291; | ### Instruction:
Как объявить переменную health со значением 968291 в C++?
### Response:
int health = 968291; |
33,269,793 | 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;
} |
61,250,862 | 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;
} |
53,667,426 | kk | Unity | array_ops | intermediate | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
1,753,865 | ru | JavaScript | var_decl | beginner | Как объявить переменную data со значением 552766 в JavaScript? | let data = 552766; | ### Instruction:
Как объявить переменную data со значением 552766 в JavaScript?
### Response:
let data = 552766; |
822,286 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 9151. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9151)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 9151.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9151)); |
4,842,500 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 318612 в C++? | int size = 318612; | ### Instruction:
Как объявить переменную size со значением 318612 в C++?
### Response:
int size = 318612; |
682,843 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 1856. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(1856)) | ### Instruction:
Write a function in Python that calculates the factorial of 1856.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(1856)) |
565,296 | kk | Java | var_decl | beginner | Java тілінде 726261 мәнімен y айнымалысын қалай жариялауға болады? | int y = 726261; | ### Instruction:
Java тілінде 726261 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 726261; |
876,850 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 8178. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8178)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 8178.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8178)); |
50,230,257 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 361 простым. | function isPrime() {
let n = 361;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 361 простым.
### Response:
function isPrime() {
let n = 361;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
82,318,310 | en | Java | logic_ops | advanced | Write a function that determines if the number 29 is prime in Java. | public bool IsPrime() {
int n = 29;
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 29 is prime in Java.
### Response:
public bool IsPrime() {
int n = 29;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.