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 |
|---|---|---|---|---|---|---|---|
59,394,579 | en | JavaScript | array_ops | advanced | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
4,149,372 | kk | Python | var_decl | beginner | Python тілінде 958631 мәнімен index айнымалысын қалай жариялауға болады? | index = 958631 | ### Instruction:
Python тілінде 958631 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 958631 |
71,733,253 | kk | Unity | logic_ops | advanced | Unity тилінде 420 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 420;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 420 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 420;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
36,849,809 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 95 простым. | public bool IsPrime() {
int n = 95;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 95 простым.
### Response:
public bool IsPrime() {
int n = 95;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,372,129 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 519506 в Java? | int x = 519506; | ### Instruction:
Как объявить переменную x со значением 519506 в Java?
### Response:
int x = 519506; |
23,709,052 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 136 is prime in Unity. | public bool IsPrime() {
int n = 136;
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 136 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 136;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
94,613,927 | 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); |
3,678,145 | ru | Java | var_decl | beginner | Как объявить переменную speed со значением 819627 в Java? | int speed = 819627; | ### Instruction:
Как объявить переменную speed со значением 819627 в Java?
### Response:
int speed = 819627; |
2,084,463 | ru | Java | var_decl | beginner | Как объявить переменную value со значением 23009 в Java? | int value = 23009; | ### Instruction:
Как объявить переменную value со значением 23009 в Java?
### Response:
int value = 23009; |
42,861,931 | kk | Python | array_ops | intermediate | Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
52,217,166 | 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;
} |
528,173 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 5586. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5586));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 5586.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5586));
} |
732,072 | ru | Python | var_decl | beginner | Как объявить переменную index со значением 236393 в Python? | index = 236393 | ### Instruction:
Как объявить переменную index со значением 236393 в Python?
### Response:
index = 236393 |
1,216,679 | kk | Python | var_decl | beginner | Python тілінде 563518 мәнімен y айнымалысын қалай жариялауға болады? | y = 563518 | ### Instruction:
Python тілінде 563518 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
y = 563518 |
4,789,633 | kk | C++ | var_decl | beginner | C++ тілінде 76592 мәнімен score айнымалысын қалай жариялауға болады? | int score = 76592; | ### Instruction:
C++ тілінде 76592 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 76592; |
88,213,677 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
2,208,704 | ru | Java | var_decl | beginner | Как объявить переменную level со значением 99394 в Java? | int level = 99394; | ### Instruction:
Как объявить переменную level со значением 99394 в Java?
### Response:
int level = 99394; |
2,922,181 | ru | Unity | var_decl | beginner | Как объявить переменную buffer со значением 774902 в Unity? | int buffer = 774902; | ### Instruction:
Как объявить переменную buffer со значением 774902 в Unity?
### Response:
int buffer = 774902; |
18,525,105 | en | Java | array_ops | intermediate | 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;
} |
56,496,982 | 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();
} |
35,685,018 | 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();
} |
66,145,189 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2003 is a leap year in Unity. | public bool IsLeap() {
int y = 2003;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2003 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2003;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
28,034,076 | kk | Python | string_ops | intermediate | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
3,559,051 | en | Python | var_decl | beginner | How to declare a variable rate with value 140279 in Python? | rate = 140279 | ### Instruction:
How to declare a variable rate with value 140279 in Python?
### Response:
rate = 140279 |
200,751 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 1356. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1356)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 1356.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1356)) |
90,061,961 | en | Python | logic_ops | advanced | 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)) |
32,377,096 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 2079 is a leap year in JavaScript. | function isLeap() {
let y = 2079;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2079 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2079;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
65,830,644 | kk | Unity | logic_ops | advanced | Unity тилінде 154 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 154;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 154 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 154;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
68,419,432 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 272 простым. | function isPrime() {
let n = 272;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 272 простым.
### Response:
function isPrime() {
let n = 272;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
95,513,937 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 458 простым. | function isPrime() {
let n = 458;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 458 простым.
### Response:
function isPrime() {
let n = 458;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
418,171 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 8058. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8058));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 8058.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8058));
} |
3,551,654 | kk | Java | var_decl | beginner | Java тілінде 320083 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 320083; | ### Instruction:
Java тілінде 320083 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 320083; |
154,115 | en | C# | var_decl | beginner | How to declare a variable data with value 135940 in C#? | int data = 135940; | ### Instruction:
How to declare a variable data with value 135940 in C#?
### Response:
int data = 135940; |
39,335,505 | kk | 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;
} |
92,035,067 | 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;
} |
1,005,734 | kk | C# | var_decl | beginner | C# тілінде 908518 мәнімен score айнымалысын қалай жариялауға болады? | int score = 908518; | ### Instruction:
C# тілінде 908518 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 908518; |
34,226,558 | en | Python | logic_ops | intermediate | Write logic to check if the year 2089 is a leap year in Python. | def is_leap():
year = 2089
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2089 is a leap year in Python.
### Response:
def is_leap():
year = 2089
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
63,699,832 | en | Python | logic_ops | advanced | Write logic to check if the year 2088 is a leap year in Python. | def is_leap():
year = 2088
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2088 is a leap year in Python.
### Response:
def is_leap():
year = 2088
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,384,318 | en | Unity | var_decl | beginner | How to declare a variable y with value 700409 in Unity? | int y = 700409; | ### Instruction:
How to declare a variable y with value 700409 in Unity?
### Response:
int y = 700409; |
42,210,090 | ru | C++ | string_ops | intermediate | Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
27,708,956 | ru | C++ | string_ops | advanced | Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
73,244,345 | kk | Java | logic_ops | advanced | Java тилінде 2010 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2010;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2010 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2010;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
17,901 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 5331. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5331)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 5331.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5331)); |
67,797,827 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 2031 is a leap year in JavaScript. | function isLeap() {
let y = 2031;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2031 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2031;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
13,556,843 | kk | C++ | logic_ops | advanced | C++ тилінде 152 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 152;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 152 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 152;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
70,590,698 | en | Java | logic_ops | advanced | Write a function that determines if the number 31 is prime in Java. | public bool IsPrime() {
int n = 31;
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 31 is prime in Java.
### Response:
public bool IsPrime() {
int n = 31;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
37,392,881 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 2046 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2046;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2046 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2046;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
71,701,540 | en | Java | logic_ops | intermediate | Write a function that determines if the number 17 is prime in Java. | public bool IsPrime() {
int n = 17;
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 17 is prime in Java.
### Response:
public bool IsPrime() {
int n = 17;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
45,335,567 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1999 високосным. | function isLeap() {
let y = 1999;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1999 високосным.
### Response:
function isLeap() {
let y = 1999;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
2,903,435 | kk | Python | var_decl | beginner | Python тілінде 720735 мәнімен index айнымалысын қалай жариялауға болады? | index = 720735 | ### Instruction:
Python тілінде 720735 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 720735 |
1,722,692 | en | C++ | var_decl | beginner | How to declare a variable buffer with value 586380 in C++? | int buffer = 586380; | ### Instruction:
How to declare a variable buffer with value 586380 in C++?
### Response:
int buffer = 586380; |
84,538,123 | 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();
} |
70,969,879 | 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(); |
76,871,016 | kk | Unity | logic_ops | intermediate | Unity тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,096,979 | ru | C# | var_decl | beginner | Как объявить переменную size со значением 430846 в C#? | int size = 430846; | ### Instruction:
Как объявить переменную size со значением 430846 в C#?
### Response:
int size = 430846; |
63,374,987 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
14,580,149 | 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();
} |
95,322,061 | en | C++ | string_ops | advanced | 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;
} |
21,138,020 | kk | Unity | logic_ops | intermediate | Unity тилінде 325 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 325;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 325 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 325;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
57,223,235 | 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;
} |
24,227,428 | 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();
} |
269,165 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 3679. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3679)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 3679.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3679)); |
3,870,663 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 574109 в Unity? | int amount = 574109; | ### Instruction:
Как объявить переменную amount со значением 574109 в Unity?
### Response:
int amount = 574109; |
1,355,111 | en | Python | var_decl | beginner | How to declare a variable y with value 383925 in Python? | y = 383925 | ### Instruction:
How to declare a variable y with value 383925 in Python?
### Response:
y = 383925 |
1,743,640 | ru | Python | var_decl | beginner | Как объявить переменную rate со значением 124049 в Python? | rate = 124049 | ### Instruction:
Как объявить переменную rate со значением 124049 в Python?
### Response:
rate = 124049 |
22,567,039 | 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();
} |
59,008,248 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1946 високосным. | public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1946 високосным.
### Response:
public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
31,712,763 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
20,332,917 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 180 простым. | public bool IsPrime() {
int n = 180;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 180 простым.
### Response:
public bool IsPrime() {
int n = 180;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
92,392,824 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,069,899 | en | JavaScript | var_decl | beginner | How to declare a variable weight with value 445730 in JavaScript? | let weight = 445730; | ### Instruction:
How to declare a variable weight with value 445730 in JavaScript?
### Response:
let weight = 445730; |
55,968,320 | en | C# | logic_ops | advanced | Write a function that determines if the number 31 is prime in C#. | public bool IsPrime() {
int n = 31;
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 31 is prime in C#.
### Response:
public bool IsPrime() {
int n = 31;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
307,897 | kk | C# | factorial | advanced | C# тілінде 6101 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6101)); | ### Instruction:
C# тілінде 6101 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6101)); |
94,087,309 | kk | Java | logic_ops | advanced | Java тилінде 40 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 40;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 40 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 40;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
47,123,683 | 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] |
96,095,399 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2065 is a leap year in JavaScript. | function isLeap() {
let y = 2065;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2065 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2065;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
90,536,500 | kk | Java | logic_ops | intermediate | Java тилінде 183 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 183;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 183 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 183;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
23,577,127 | kk | C++ | logic_ops | intermediate | C++ тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2081;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2081;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
172,709 | kk | Unity | factorial | advanced | Unity тілінде 6240 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6240));
} | ### Instruction:
Unity тілінде 6240 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6240));
} |
62,020,793 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 2031 високосным. | public bool IsLeap() {
int y = 2031;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2031 високосным.
### Response:
public bool IsLeap() {
int y = 2031;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
60,031,613 | kk | C++ | array_ops | intermediate | C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
42,348,644 | kk | C++ | logic_ops | intermediate | C++ тилінде 1905 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1905;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1905 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1905;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
102,243 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 2638. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2638)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 2638.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2638)) |
72,355,334 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
3,923,991 | kk | Java | var_decl | beginner | Java тілінде 701916 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 701916; | ### Instruction:
Java тілінде 701916 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 701916; |
4,581,443 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 940391 in JavaScript? | let speed = 940391; | ### Instruction:
How to declare a variable speed with value 940391 in JavaScript?
### Response:
let speed = 940391; |
81,770,934 | 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);
} |
82,704,782 | 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;
} |
58,176,342 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 2046 високосным. | public bool IsLeap() {
int y = 2046;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2046 високосным.
### Response:
public bool IsLeap() {
int y = 2046;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
79,767,198 | kk | C# | logic_ops | advanced | C# тилінде 469 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 469;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 469 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 469;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
46,338,389 | 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(''); |
1,527,353 | en | Python | var_decl | beginner | How to declare a variable total with value 962266 in Python? | total = 962266 | ### Instruction:
How to declare a variable total with value 962266 in Python?
### Response:
total = 962266 |
37,720,728 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
55,403,659 | kk | Python | logic_ops | advanced | Python тилінде 461 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 461
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 461 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 461
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
46,087,045 | 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;
} |
20,307,845 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
95,075,017 | 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;
} |
451,308 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 6555-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(6555) << std::endl; | ### Instruction:
C++ тілінде 1-ден 6555-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(6555) << std::endl; |
70,141,955 | 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;
} |
2,758,659 | kk | C++ | var_decl | beginner | C++ тілінде 389878 мәнімен size айнымалысын қалай жариялауға болады? | int size = 389878; | ### Instruction:
C++ тілінде 389878 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 389878; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.