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
1,388,612
kk
Python
var_decl
beginner
Python тілінде 306510 мәнімен score айнымалысын қалай жариялауға болады?
score = 306510
### Instruction: Python тілінде 306510 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 306510
1,225,010
ru
Python
var_decl
beginner
Как объявить переменную y со значением 747833 в Python?
y = 747833
### Instruction: Как объявить переменную y со значением 747833 в Python? ### Response: y = 747833
18,019,991
en
Unity
string_ops
intermediate
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; }
40,308,683
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,164,708
kk
Python
var_decl
beginner
Python тілінде 657670 мәнімен score айнымалысын қалай жариялауға болады?
score = 657670
### Instruction: Python тілінде 657670 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 657670
56,768,315
en
Unity
logic_ops
intermediate
Write logic to check if the year 1969 is a leap year in Unity.
public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1969 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,105,307
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; }
31,873
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 822.
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(822) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 822. ### 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(822) << std::endl;
651,731
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 4796-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(4796) << std::endl;
### Instruction: C++ тілінде 1-ден 4796-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(4796) << std::endl;
85,171,366
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2060 високосным.
def is_leap(): year = 2060 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2060 високосным. ### Response: def is_leap(): year = 2060 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
59,402,687
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; }
4,060,219
ru
C#
var_decl
beginner
Как объявить переменную x со значением 581837 в C#?
int x = 581837;
### Instruction: Как объявить переменную x со значением 581837 в C#? ### Response: int x = 581837;
3,742,882
ru
C++
var_decl
beginner
Как объявить переменную health со значением 635159 в C++?
int health = 635159;
### Instruction: Как объявить переменную health со значением 635159 в C++? ### Response: int health = 635159;
99,861,881
kk
C#
logic_ops
intermediate
C# тилінде 204 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 204; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 204 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 204; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
16,500,797
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
1,061,576
kk
JavaScript
var_decl
beginner
JavaScript тілінде 248408 мәнімен x айнымалысын қалай жариялауға болады?
let x = 248408;
### Instruction: JavaScript тілінде 248408 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 248408;
96,705,697
en
Python
logic_ops
intermediate
Write logic to check if the year 2046 is a leap year in Python.
def is_leap(): year = 2046 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2046 is a leap year in Python. ### Response: def is_leap(): year = 2046 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
27,063,533
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,904,684
en
C++
var_decl
beginner
How to declare a variable offset with value 970576 in C++?
int offset = 970576;
### Instruction: How to declare a variable offset with value 970576 in C++? ### Response: int offset = 970576;
44,401,276
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
52,506,393
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); }
654,240
ru
Java
var_decl
beginner
Как объявить переменную health со значением 583209 в Java?
int health = 583209;
### Instruction: Как объявить переменную health со значением 583209 в Java? ### Response: int health = 583209;
88,922,354
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2090 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2090; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2090 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2090; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
26,018,613
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 259 простым.
public bool IsPrime() { int n = 259; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 259 простым. ### Response: public bool IsPrime() { int n = 259; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
19,457,449
ru
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); }
479,515
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 362633 в Unity?
int y = 362633;
### Instruction: Как объявить переменную y со значением 362633 в Unity? ### Response: int y = 362633;
17,062,660
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(); }
3,177,659
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 609467 в C++?
int offset = 609467;
### Instruction: Как объявить переменную offset со значением 609467 в C++? ### Response: int offset = 609467;
866,318
ru
C++
var_decl
beginner
Как объявить переменную score со значением 92553 в C++?
int score = 92553;
### Instruction: Как объявить переменную score со значением 92553 в C++? ### Response: int score = 92553;
65,737,557
en
Python
array_ops
advanced
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]
1,077,412
en
Java
var_decl
beginner
How to declare a variable result with value 747434 in Java?
int result = 747434;
### Instruction: How to declare a variable result with value 747434 in Java? ### Response: int result = 747434;
50,209,267
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; }
32,523,796
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; }
292,067
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 1064.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1064)); }
### Instruction: Write a function in Unity that calculates the factorial of 1064. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1064)); }
23,801,115
en
Python
array_ops
intermediate
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]
744,060
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 825936 в Unity?
int limit = 825936;
### Instruction: Как объявить переменную limit со значением 825936 в Unity? ### Response: int limit = 825936;
45,731,413
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 44 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 44; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 44 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 44; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,321,873
kk
C#
var_decl
beginner
C# тілінде 618013 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 618013;
### Instruction: C# тілінде 618013 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 618013;
94,684,928
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,455,971
ru
Java
var_decl
beginner
Как объявить переменную result со значением 367239 в Java?
int result = 367239;
### Instruction: Как объявить переменную result со значением 367239 в Java? ### Response: int result = 367239;
977,693
en
Python
var_decl
beginner
How to declare a variable result with value 619125 in Python?
result = 619125
### Instruction: How to declare a variable result with value 619125 in Python? ### Response: result = 619125
72,083,477
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('');
3,334,395
ru
C++
var_decl
beginner
Как объявить переменную index со значением 838579 в C++?
int index = 838579;
### Instruction: Как объявить переменную index со значением 838579 в C++? ### Response: int index = 838579;
41,012,369
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
88,340
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 7733.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7733))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 7733. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7733))
2,136,950
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 102063 в JavaScript?
let limit = 102063;
### Instruction: Как объявить переменную limit со значением 102063 в JavaScript? ### Response: let limit = 102063;
12,704,499
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 347 простым.
public bool IsPrime() { int n = 347; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 347 простым. ### Response: public bool IsPrime() { int n = 347; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
20,905,429
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]
1,929,758
en
C#
var_decl
beginner
How to declare a variable weight with value 243401 in C#?
int weight = 243401;
### Instruction: How to declare a variable weight with value 243401 in C#? ### Response: int weight = 243401;
37,561,041
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
89,823,074
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
22,091,512
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; }
3,232,571
kk
C++
var_decl
beginner
C++ тілінде 798400 мәнімен result айнымалысын қалай жариялауға болады?
int result = 798400;
### Instruction: C++ тілінде 798400 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 798400;
4,382,453
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 945321 в Java?
int speed = 945321;
### Instruction: Как объявить переменную speed со значением 945321 в Java? ### Response: int speed = 945321;
85,359,188
kk
C#
logic_ops
advanced
C# тилінде 254 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 254; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 254 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 254; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
631,552
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 772487 в Java?
int weight = 772487;
### Instruction: Как объявить переменную weight со значением 772487 в Java? ### Response: int weight = 772487;
92,727,508
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]
196,537
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 4411.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4411)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 4411. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4411)); }
2,949,671
ru
Python
var_decl
beginner
Как объявить переменную size со значением 556157 в Python?
size = 556157
### Instruction: Как объявить переменную size со значением 556157 в Python? ### Response: size = 556157
3,258,339
ru
Python
var_decl
beginner
Как объявить переменную result со значением 781958 в Python?
result = 781958
### Instruction: Как объявить переменную result со значением 781958 в Python? ### Response: result = 781958
90,967,555
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,039,605
kk
Java
var_decl
beginner
Java тілінде 825186 мәнімен level айнымалысын қалай жариялауға болады?
int level = 825186;
### Instruction: Java тілінде 825186 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 825186;
1,177,517
en
C#
var_decl
beginner
How to declare a variable result with value 643 in C#?
int result = 643;
### Instruction: How to declare a variable result with value 643 in C#? ### Response: int result = 643;
20,859,031
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; }
4,523,781
en
C++
var_decl
beginner
How to declare a variable data with value 659358 in C++?
int data = 659358;
### Instruction: How to declare a variable data with value 659358 in C++? ### Response: int data = 659358;
76,061,065
ru
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);
4,191,538
en
Unity
var_decl
beginner
How to declare a variable x with value 672855 in Unity?
int x = 672855;
### Instruction: How to declare a variable x with value 672855 in Unity? ### Response: int x = 672855;
98,031,431
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
1,249,032
en
Unity
var_decl
beginner
How to declare a variable size with value 437463 in Unity?
int size = 437463;
### Instruction: How to declare a variable size with value 437463 in Unity? ### Response: int size = 437463;
99,106,597
en
Java
logic_ops
advanced
Write logic to check if the year 1904 is a leap year in Java.
public bool IsLeap() { int y = 1904; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1904 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1904; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,178,208
en
JavaScript
var_decl
beginner
How to declare a variable health with value 420606 in JavaScript?
let health = 420606;
### Instruction: How to declare a variable health with value 420606 in JavaScript? ### Response: let health = 420606;
52,864,397
kk
Python
string_ops
intermediate
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
50,254,526
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); }
63,256,503
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);
352,416
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 2954.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2954));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 2954. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2954));
69,579,670
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
19,068,402
kk
Unity
string_ops
intermediate
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; }
61,611
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 9595-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9595)); }
### Instruction: Unity тілінде 1-ден 9595-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9595)); }
67,608,441
en
Unity
logic_ops
intermediate
Write a function that determines if the number 482 is prime in Unity.
public bool IsPrime() { int n = 482; 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 482 is prime in Unity. ### Response: public bool IsPrime() { int n = 482; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,872,687
ru
Java
var_decl
beginner
Как объявить переменную health со значением 569449 в Java?
int health = 569449;
### Instruction: Как объявить переменную health со значением 569449 в Java? ### Response: int health = 569449;
2,137,497
kk
C#
var_decl
beginner
C# тілінде 202577 мәнімен level айнымалысын қалай жариялауға болады?
int level = 202577;
### Instruction: C# тілінде 202577 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 202577;
1,297,234
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 4417.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4417) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 4417. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4417) << std::endl;
6,306
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 5697.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5697)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 5697. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5697)); }
89,692,287
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
28,423,150
kk
C++
logic_ops
advanced
C++ тилінде 295 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 295; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 295 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 295; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
42,523,234
kk
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]
48,090,158
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
1,837,284
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 719309 в Unity?
int total = 719309;
### Instruction: Как объявить переменную total со значением 719309 в Unity? ### Response: int total = 719309;
86,289,133
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,806,816
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(); }
3,832,596
kk
Unity
var_decl
beginner
Unity тілінде 654236 мәнімен score айнымалысын қалай жариялауға болады?
int score = 654236;
### Instruction: Unity тілінде 654236 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 654236;
568,926
ru
Java
var_decl
beginner
Как объявить переменную limit со значением 641679 в Java?
int limit = 641679;
### Instruction: Как объявить переменную limit со значением 641679 в Java? ### Response: int limit = 641679;
2,347,844
en
Unity
var_decl
beginner
How to declare a variable size with value 276582 in Unity?
int size = 276582;
### Instruction: How to declare a variable size with value 276582 in Unity? ### Response: int size = 276582;
23,150,859
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 77 простым.
public bool IsPrime() { int n = 77; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 77 простым. ### Response: public bool IsPrime() { int n = 77; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
360,995
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5859.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5859)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 5859. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5859)); }
1,426,033
en
Unity
var_decl
beginner
How to declare a variable weight with value 735689 in Unity?
int weight = 735689;
### Instruction: How to declare a variable weight with value 735689 in Unity? ### Response: int weight = 735689;
88,002,870
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1998 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1998; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1998 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1998; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
20,162,929
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
3,054,521
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 308261 в C#?
int speed = 308261;
### Instruction: Как объявить переменную speed со значением 308261 в C#? ### Response: int speed = 308261;
72,695,665
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 456 простым.
public bool IsPrime() { int n = 456; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 456 простым. ### Response: public bool IsPrime() { int n = 456; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }