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 |
|---|---|---|---|---|---|---|---|
68,013,955 | kk | Unity | logic_ops | advanced | Unity тилінде 188 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 188;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 188 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 188;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,635,917 | kk | C# | var_decl | beginner | C# тілінде 304109 мәнімен y айнымалысын қалай жариялауға болады? | int y = 304109; | ### Instruction:
C# тілінде 304109 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 304109; |
48,977 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 4542-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4542));
} | ### Instruction:
Unity тілінде 1-ден 4542-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4542));
} |
46,956,451 | 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] |
79,172,168 | kk | C# | logic_ops | advanced | C# тилінде 1906 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 1906 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
94,221,980 | kk | C++ | string_ops | advanced | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
262,680 | kk | JavaScript | factorial | advanced | JavaScript тілінде 6027 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6027)); | ### Instruction:
JavaScript тілінде 6027 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6027)); |
91,540,811 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1938 is a leap year in JavaScript. | function isLeap() {
let y = 1938;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1938 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1938;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,257,940 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 163743 мәнімен amount айнымалысын қалай жариялауға болады? | let amount = 163743; | ### Instruction:
JavaScript тілінде 163743 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
let amount = 163743; |
44,370,330 | 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;
} |
91,082,000 | 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] |
91,387,479 | 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;
} |
38,046,314 | 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;
} |
3,898,944 | kk | Python | var_decl | beginner | Python тілінде 666372 мәнімен offset айнымалысын қалай жариялауға болады? | offset = 666372 | ### Instruction:
Python тілінде 666372 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
offset = 666372 |
2,593,571 | ru | C++ | var_decl | beginner | Как объявить переменную value со значением 336586 в C++? | int value = 336586; | ### Instruction:
Как объявить переменную value со значением 336586 в C++?
### Response:
int value = 336586; |
47,113,614 | 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(''); |
24,044,099 | kk | C# | logic_ops | intermediate | C# тилінде 2039 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2039;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2039 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2039;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,805,456 | ru | Java | var_decl | beginner | Как объявить переменную total со значением 285460 в Java? | int total = 285460; | ### Instruction:
Как объявить переменную total со значением 285460 в Java?
### Response:
int total = 285460; |
773,601 | en | C# | var_decl | beginner | How to declare a variable speed with value 755173 in C#? | int speed = 755173; | ### Instruction:
How to declare a variable speed with value 755173 in C#?
### Response:
int speed = 755173; |
33,756,485 | 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;
} |
3,478,967 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 200427 в JavaScript? | let index = 200427; | ### Instruction:
Как объявить переменную index со значением 200427 в JavaScript?
### Response:
let index = 200427; |
88,279,145 | en | C# | array_ops | intermediate | Write a function that finds the maximum number in an array in C#. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C#.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
226,327 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1490. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(1490)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1490.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(1490)); |
4,694,742 | en | Java | var_decl | beginner | How to declare a variable result with value 731138 in Java? | int result = 731138; | ### Instruction:
How to declare a variable result with value 731138 in Java?
### Response:
int result = 731138; |
38,940,796 | en | C# | logic_ops | advanced | Write a function that determines if the number 105 is prime in C#. | public bool IsPrime() {
int n = 105;
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 105 is prime in C#.
### Response:
public bool IsPrime() {
int n = 105;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
42,562,988 | 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;
} |
72,780,760 | en | Java | logic_ops | intermediate | Write a function that determines if the number 120 is prime in Java. | public bool IsPrime() {
int n = 120;
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 120 is prime in Java.
### Response:
public bool IsPrime() {
int n = 120;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,242,004 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 956087 в JavaScript? | let total = 956087; | ### Instruction:
Как объявить переменную total со значением 956087 в JavaScript?
### Response:
let total = 956087; |
256,093 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 7960. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7960));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 7960.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7960));
} |
2,222,333 | ru | Unity | var_decl | beginner | Как объявить переменную level со значением 672763 в Unity? | int level = 672763; | ### Instruction:
Как объявить переменную level со значением 672763 в Unity?
### Response:
int level = 672763; |
46,629,678 | 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;
} |
4,012,931 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 77443 в Python? | limit = 77443 | ### Instruction:
Как объявить переменную limit со значением 77443 в Python?
### Response:
limit = 77443 |
2,616,241 | ru | C++ | var_decl | beginner | Как объявить переменную weight со значением 786041 в C++? | int weight = 786041; | ### Instruction:
Как объявить переменную weight со значением 786041 в C++?
### Response:
int weight = 786041; |
64,276,267 | 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();
} |
57,907,849 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
1,837,887 | en | Python | var_decl | beginner | How to declare a variable y with value 411602 in Python? | y = 411602 | ### Instruction:
How to declare a variable y with value 411602 in Python?
### Response:
y = 411602 |
68,807,263 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 232 is prime in JavaScript. | function isPrime() {
let n = 232;
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 232 is prime in JavaScript.
### Response:
function isPrime() {
let n = 232;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
41,272,350 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
70,054,538 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
2,076,067 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 531390 in JavaScript? | let count = 531390; | ### Instruction:
How to declare a variable count with value 531390 in JavaScript?
### Response:
let count = 531390; |
812,286 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 709012 в JavaScript? | let index = 709012; | ### Instruction:
Как объявить переменную index со значением 709012 в JavaScript?
### Response:
let index = 709012; |
4,108,843 | kk | Python | var_decl | beginner | Python тілінде 802094 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 802094 | ### Instruction:
Python тілінде 802094 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 802094 |
24,151,655 | 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;
} |
38,375,860 | kk | Python | string_ops | advanced | 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аеёиоуыэюя') |
4,729,418 | ru | C# | var_decl | beginner | Как объявить переменную offset со значением 780205 в C#? | int offset = 780205; | ### Instruction:
Как объявить переменную offset со значением 780205 в C#?
### Response:
int offset = 780205; |
44,361 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 4707. | 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(4707) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 4707.
### 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(4707) << std::endl; |
75,017,114 | kk | Java | logic_ops | advanced | Java тилінде 158 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 158;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 158 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 158;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
468,621 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 3468. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3468)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 3468.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3468)); |
83,582,555 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1983 високосным. | public bool IsLeap() {
int y = 1983;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1983 високосным.
### Response:
public bool IsLeap() {
int y = 1983;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
83,002,885 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1989 високосным. | def is_leap():
year = 1989
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1989 високосным.
### Response:
def is_leap():
year = 1989
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
31,725,437 | 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;
} |
88,484,583 | 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;
} |
20,617,112 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 3 простым. | def is_prime():
n = 3
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 3 простым.
### Response:
def is_prime():
n = 3
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
31,049,573 | kk | Python | logic_ops | intermediate | Python тилінде 19 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 19
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 19 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 19
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
3,441,403 | en | Python | var_decl | beginner | How to declare a variable level with value 928005 in Python? | level = 928005 | ### Instruction:
How to declare a variable level with value 928005 in Python?
### Response:
level = 928005 |
42,643,643 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 2092 високосным. | public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2092 високосным.
### Response:
public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,633,440 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 516949 мәнімен level айнымалысын қалай жариялауға болады? | let level = 516949; | ### Instruction:
JavaScript тілінде 516949 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
let level = 516949; |
1,352,330 | en | JavaScript | var_decl | beginner | How to declare a variable amount with value 918020 in JavaScript? | let amount = 918020; | ### Instruction:
How to declare a variable amount with value 918020 in JavaScript?
### Response:
let amount = 918020; |
22,436,233 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 1961 високосным. | function isLeap() {
let y = 1961;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1961 високосным.
### Response:
function isLeap() {
let y = 1961;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
14,058,411 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 21 is prime in JavaScript. | function isPrime() {
let n = 21;
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 21 is prime in JavaScript.
### Response:
function isPrime() {
let n = 21;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
73,497,947 | kk | C++ | logic_ops | intermediate | C++ тилінде 489 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 489;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 489 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 489;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,246,894 | ru | Python | var_decl | beginner | Как объявить переменную total со значением 114876 в Python? | total = 114876 | ### Instruction:
Как объявить переменную total со значением 114876 в Python?
### Response:
total = 114876 |
91,041,947 | en | C++ | string_ops | advanced | 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;
} |
97,293,683 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
80,725,482 | 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;
} |
55,593,057 | 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(); |
4,997,296 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 296915 в JavaScript? | let rate = 296915; | ### Instruction:
Как объявить переменную rate со значением 296915 в JavaScript?
### Response:
let rate = 296915; |
88,238,697 | 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);
} |
167,407 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 6649-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6649));
} | ### Instruction:
Unity тілінде 1-ден 6649-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6649));
} |
93,246,659 | 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();
} |
80,776,842 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1981 is a leap year in Unity. | public bool IsLeap() {
int y = 1981;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1981 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1981;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
99,091,643 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 38 is prime in JavaScript. | function isPrime() {
let n = 38;
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 38 is prime in JavaScript.
### Response:
function isPrime() {
let n = 38;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
75,860,520 | kk | Python | logic_ops | intermediate | Python тилінде 457 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 457
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 457 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 457
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
79,458,997 | 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;
} |
1,070,485 | kk | Python | var_decl | beginner | Python тілінде 458370 мәнімен y айнымалысын қалай жариялауға болады? | y = 458370 | ### Instruction:
Python тілінде 458370 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
y = 458370 |
2,157,332 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 756611 в JavaScript? | let rate = 756611; | ### Instruction:
Как объявить переменную rate со значением 756611 в JavaScript?
### Response:
let rate = 756611; |
1,820,360 | kk | C++ | var_decl | beginner | C++ тілінде 373866 мәнімен value айнымалысын қалай жариялауға болады? | int value = 373866; | ### Instruction:
C++ тілінде 373866 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 373866; |
2,179,030 | kk | Python | var_decl | beginner | Python тілінде 22417 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 22417 | ### Instruction:
Python тілінде 22417 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 22417 |
38,457,155 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
12,003,619 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
238,004 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 961. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(961)) | ### Instruction:
Write a function in Python that calculates the factorial of 961.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(961)) |
52,319,343 | kk | Unity | logic_ops | intermediate | Unity тилінде 1919 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1919;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1919 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1919;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,055,890 | 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);
} |
99,958,477 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 64 простым. | public bool IsPrime() {
int n = 64;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 64 простым.
### Response:
public bool IsPrime() {
int n = 64;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,976,643 | kk | C++ | var_decl | beginner | C++ тілінде 265516 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 265516; | ### Instruction:
C++ тілінде 265516 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 265516; |
191,495 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 9231. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(9231)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 9231.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(9231)); |
3,359,716 | kk | C++ | var_decl | beginner | C++ тілінде 789551 мәнімен total айнымалысын қалай жариялауға болады? | int total = 789551; | ### Instruction:
C++ тілінде 789551 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 789551; |
1,896,724 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 449368 in JavaScript? | let count = 449368; | ### Instruction:
How to declare a variable count with value 449368 in JavaScript?
### Response:
let count = 449368; |
87,324,740 | en | Python | logic_ops | intermediate | Write logic to check if the year 1920 is a leap year in Python. | def is_leap():
year = 1920
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1920 is a leap year in Python.
### Response:
def is_leap():
year = 1920
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
14,633,127 | kk | Python | logic_ops | advanced | Python тилінде 488 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 488
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 488 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 488
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
66,872 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 7467. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7467)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 7467.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7467)) |
4,187,403 | ru | Java | var_decl | beginner | Как объявить переменную level со значением 866203 в Java? | int level = 866203; | ### Instruction:
Как объявить переменную level со значением 866203 в Java?
### Response:
int level = 866203; |
3,207,159 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 605877 in JavaScript? | let limit = 605877; | ### Instruction:
How to declare a variable limit with value 605877 in JavaScript?
### Response:
let limit = 605877; |
2,073,258 | kk | Java | var_decl | beginner | Java тілінде 634314 мәнімен y айнымалысын қалай жариялауға болады? | int y = 634314; | ### Instruction:
Java тілінде 634314 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 634314; |
22,165,998 | 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;
} |
75,858,137 | 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;
} |
13,057,161 | 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;
} |
3,463,493 | ru | C# | var_decl | beginner | Как объявить переменную health со значением 331044 в C#? | int health = 331044; | ### Instruction:
Как объявить переменную health со значением 331044 в C#?
### Response:
int health = 331044; |
3,968,666 | en | Java | var_decl | beginner | How to declare a variable y with value 453782 in Java? | int y = 453782; | ### Instruction:
How to declare a variable y with value 453782 in Java?
### Response:
int y = 453782; |
11,181,602 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.