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 |
|---|---|---|---|---|---|---|---|
48,527,679 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
44,189,061 | en | Python | logic_ops | advanced | Write logic to check if the year 1924 is a leap year in Python. | def is_leap():
year = 1924
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1924 is a leap year in Python.
### Response:
def is_leap():
year = 1924
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
27,143,502 | 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;
} |
199,263 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 555. | 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(555) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 555.
### 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(555) << std::endl; |
13,467,380 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
2,946,028 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 382368 in JavaScript? | let x = 382368; | ### Instruction:
How to declare a variable x with value 382368 in JavaScript?
### Response:
let x = 382368; |
803,965 | kk | Unity | var_decl | beginner | Unity тілінде 466146 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 466146; | ### Instruction:
Unity тілінде 466146 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 466146; |
820,689 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 987709 в Unity? | int value = 987709; | ### Instruction:
Как объявить переменную value со значением 987709 в Unity?
### Response:
int value = 987709; |
49,042,426 | 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);
} |
49,623,565 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 63 простым. | public bool IsPrime() {
int n = 63;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 63 простым.
### Response:
public bool IsPrime() {
int n = 63;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
407,465 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 7876. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7876));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 7876.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7876));
} |
269,884 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 420070 в Java? | int health = 420070; | ### Instruction:
Как объявить переменную health со значением 420070 в Java?
### Response:
int health = 420070; |
1,477,161 | kk | Python | var_decl | beginner | Python тілінде 294375 мәнімен total айнымалысын қалай жариялауға болады? | total = 294375 | ### Instruction:
Python тілінде 294375 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
total = 294375 |
62,168,723 | kk | Python | logic_ops | intermediate | Python тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2081
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2081
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,113,723 | kk | C# | var_decl | beginner | C# тілінде 335990 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 335990; | ### Instruction:
C# тілінде 335990 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 335990; |
3,447,185 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 122930 в C++? | int rate = 122930; | ### Instruction:
Как объявить переменную rate со значением 122930 в C++?
### Response:
int rate = 122930; |
305,467 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 1049. | 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(1049) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 1049.
### 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(1049) << std::endl; |
1,888,164 | en | Unity | var_decl | beginner | How to declare a variable result with value 982255 in Unity? | int result = 982255; | ### Instruction:
How to declare a variable result with value 982255 in Unity?
### Response:
int result = 982255; |
51,088,937 | en | C# | logic_ops | advanced | Write a function that determines if the number 253 is prime in C#. | public bool IsPrime() {
int n = 253;
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 253 is prime in C#.
### Response:
public bool IsPrime() {
int n = 253;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
70,803,794 | ru | C# | array_ops | intermediate | Напишите на C# функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C# функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
11,352,782 | 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;
} |
3,930,530 | ru | Unity | var_decl | beginner | Как объявить переменную limit со значением 540495 в Unity? | int limit = 540495; | ### Instruction:
Как объявить переменную limit со значением 540495 в Unity?
### Response:
int limit = 540495; |
198,495 | en | Python | var_decl | beginner | How to declare a variable x with value 942362 in Python? | x = 942362 | ### Instruction:
How to declare a variable x with value 942362 in Python?
### Response:
x = 942362 |
160,510 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 4501. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4501)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 4501.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4501)); |
1,496,070 | kk | Unity | var_decl | beginner | Unity тілінде 449752 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 449752; | ### Instruction:
Unity тілінде 449752 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 449752; |
31,881,792 | 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(); |
449,268 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 4586. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4586)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 4586.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4586)); |
102,637 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 7632. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7632));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 7632.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7632));
} |
4,208,480 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 873121 in JavaScript? | let count = 873121; | ### Instruction:
How to declare a variable count with value 873121 in JavaScript?
### Response:
let count = 873121; |
73,412,051 | 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;
} |
44,600,619 | kk | C# | logic_ops | advanced | C# тилінде 2006 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2006;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2006 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2006;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
297,659 | en | Unity | var_decl | beginner | How to declare a variable health with value 588311 in Unity? | int health = 588311; | ### Instruction:
How to declare a variable health with value 588311 in Unity?
### Response:
int health = 588311; |
10,474,606 | kk | Java | array_ops | advanced | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
76,661,533 | en | Python | logic_ops | advanced | Write logic to check if the year 1917 is a leap year in Python. | def is_leap():
year = 1917
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1917 is a leap year in Python.
### Response:
def is_leap():
year = 1917
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
71,375,692 | en | Java | string_ops | intermediate | Write a function that counts vowels in a text in Java. | 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 Java.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
36,422,058 | en | C++ | logic_ops | advanced | Write logic to check if the year 2058 is a leap year in C++. | public bool IsLeap() {
int y = 2058;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2058 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2058;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
53,273,862 | ru | Unity | string_ops | intermediate | Напишите на 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;
} |
495,921 | kk | C# | var_decl | beginner | C# тілінде 779164 мәнімен count айнымалысын қалай жариялауға болады? | int count = 779164; | ### Instruction:
C# тілінде 779164 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 779164; |
60,206,329 | en | Unity | string_ops | intermediate | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
4,818,042 | ru | C++ | var_decl | beginner | Как объявить переменную limit со значением 424090 в C++? | int limit = 424090; | ### Instruction:
Как объявить переменную limit со значением 424090 в C++?
### Response:
int limit = 424090; |
79,042,088 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
4,921,696 | en | Unity | var_decl | beginner | How to declare a variable y with value 567071 in Unity? | int y = 567071; | ### Instruction:
How to declare a variable y with value 567071 in Unity?
### Response:
int y = 567071; |
3,811,697 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 16339 мәнімен total айнымалысын қалай жариялауға болады? | let total = 16339; | ### Instruction:
JavaScript тілінде 16339 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
let total = 16339; |
68,331,286 | en | C# | array_ops | advanced | 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;
} |
291,630 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 4804. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4804)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 4804.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4804)); |
22,484,817 | en | Java | string_ops | intermediate | Write a function that checks if a string is a palindrome in Java. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Java.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
4,929,940 | en | JavaScript | var_decl | beginner | How to declare a variable amount with value 833654 in JavaScript? | let amount = 833654; | ### Instruction:
How to declare a variable amount with value 833654 in JavaScript?
### Response:
let amount = 833654; |
61,116 | kk | Python | factorial | advanced | Python тілінде 9047 санының факториалын есептейтін функция жаз. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9047)) | ### Instruction:
Python тілінде 9047 санының факториалын есептейтін функция жаз.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9047)) |
48,401,685 | 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;
} |
1,697,244 | kk | Java | var_decl | beginner | Java тілінде 508358 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 508358; | ### Instruction:
Java тілінде 508358 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 508358; |
15,866,080 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
258,611 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 5772. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5772)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 5772.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5772)); |
4,699,587 | kk | Python | var_decl | beginner | Python тілінде 357372 мәнімен score айнымалысын қалай жариялауға болады? | score = 357372 | ### Instruction:
Python тілінде 357372 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
score = 357372 |
12,816,591 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2059 високосным. | function isLeap() {
let y = 2059;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2059 високосным.
### Response:
function isLeap() {
let y = 2059;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
81,775,240 | 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;
} |
59,061,315 | 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;
} |
96,498,909 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 335 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 335;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 335 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 335;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
4,894,972 | kk | Java | var_decl | beginner | Java тілінде 327909 мәнімен x айнымалысын қалай жариялауға болады? | int x = 327909; | ### Instruction:
Java тілінде 327909 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 327909; |
2,473,246 | kk | C# | var_decl | beginner | C# тілінде 257826 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 257826; | ### Instruction:
C# тілінде 257826 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 257826; |
80,278,776 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2009 високосным. | public bool IsLeap() {
int y = 2009;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2009 високосным.
### Response:
public bool IsLeap() {
int y = 2009;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
77,682,006 | ru | Unity | string_ops | intermediate | Напишите на 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;
} |
186,064 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 413397 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 413397; | ### Instruction:
JavaScript тілінде 413397 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 413397; |
715,596 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 1078. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1078));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 1078.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1078));
} |
54,150,639 | en | C# | logic_ops | advanced | Write logic to check if the year 1933 is a leap year in C#. | public bool IsLeap() {
int y = 1933;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1933 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1933;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,029,541 | kk | Python | array_ops | intermediate | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
157,656 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 5887-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(5887)) | ### Instruction:
Python тілінде 1-ден 5887-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(5887)) |
19,269,608 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2087 is a leap year in C++. | public bool IsLeap() {
int y = 2087;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2087 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2087;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,707,958 | en | Java | var_decl | beginner | How to declare a variable value with value 195749 in Java? | int value = 195749; | ### Instruction:
How to declare a variable value with value 195749 in Java?
### Response:
int value = 195749; |
4,468,008 | en | Unity | var_decl | beginner | How to declare a variable value with value 478568 in Unity? | int value = 478568; | ### Instruction:
How to declare a variable value with value 478568 in Unity?
### Response:
int value = 478568; |
4,739,795 | en | Python | var_decl | beginner | How to declare a variable total with value 797048 in Python? | total = 797048 | ### Instruction:
How to declare a variable total with value 797048 in Python?
### Response:
total = 797048 |
57,500,024 | en | C++ | array_ops | intermediate | Write a function that reverses a list in C++. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C++.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
17,736,237 | 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аеёиоуыэюя') |
1,988,261 | en | JavaScript | var_decl | beginner | How to declare a variable health with value 217931 in JavaScript? | let health = 217931; | ### Instruction:
How to declare a variable health with value 217931 in JavaScript?
### Response:
let health = 217931; |
21,993,718 | kk | Unity | logic_ops | intermediate | Unity тилінде 113 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 113;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 113 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 113;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,203,004 | en | C++ | var_decl | beginner | How to declare a variable x with value 975008 in C++? | int x = 975008; | ### Instruction:
How to declare a variable x with value 975008 in C++?
### Response:
int x = 975008; |
4,929,612 | en | C++ | var_decl | beginner | How to declare a variable level with value 883575 in C++? | int level = 883575; | ### Instruction:
How to declare a variable level with value 883575 in C++?
### Response:
int level = 883575; |
1,050,693 | kk | Python | var_decl | beginner | Python тілінде 22727 мәнімен timer айнымалысын қалай жариялауға болады? | timer = 22727 | ### Instruction:
Python тілінде 22727 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
timer = 22727 |
4,916,829 | en | C# | var_decl | beginner | How to declare a variable value with value 712473 in C#? | int value = 712473; | ### Instruction:
How to declare a variable value with value 712473 in C#?
### Response:
int value = 712473; |
1,061,503 | ru | Java | var_decl | beginner | Как объявить переменную result со значением 326665 в Java? | int result = 326665; | ### Instruction:
Как объявить переменную result со значением 326665 в Java?
### Response:
int result = 326665; |
2,682,994 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 313952 в JavaScript? | let rate = 313952; | ### Instruction:
Как объявить переменную rate со значением 313952 в JavaScript?
### Response:
let rate = 313952; |
4,460,681 | en | Java | var_decl | beginner | How to declare a variable timer with value 509665 in Java? | int timer = 509665; | ### Instruction:
How to declare a variable timer with value 509665 in Java?
### Response:
int timer = 509665; |
55,049,007 | 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(''); |
1,769,416 | ru | Java | var_decl | beginner | Как объявить переменную offset со значением 22883 в Java? | int offset = 22883; | ### Instruction:
Как объявить переменную offset со значением 22883 в Java?
### Response:
int offset = 22883; |
3,267,576 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 196468 в C++? | int size = 196468; | ### Instruction:
Как объявить переменную size со значением 196468 в C++?
### Response:
int size = 196468; |
2,359,727 | kk | Unity | var_decl | beginner | Unity тілінде 732391 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 732391; | ### Instruction:
Unity тілінде 732391 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 732391; |
3,768,462 | kk | Python | var_decl | beginner | Python тілінде 240921 мәнімен health айнымалысын қалай жариялауға болады? | health = 240921 | ### Instruction:
Python тілінде 240921 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
health = 240921 |
29,635,927 | en | C# | logic_ops | intermediate | Write logic to check if the year 2021 is a leap year in C#. | public bool IsLeap() {
int y = 2021;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2021 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2021;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,852,523 | kk | Python | var_decl | beginner | Python тілінде 3794 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 3794 | ### Instruction:
Python тілінде 3794 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 3794 |
65,878,454 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
4,453,763 | ru | Python | var_decl | beginner | Как объявить переменную rate со значением 919731 в Python? | rate = 919731 | ### Instruction:
Как объявить переменную rate со значением 919731 в Python?
### Response:
rate = 919731 |
1,859,842 | kk | Unity | var_decl | beginner | Unity тілінде 304871 мәнімен data айнымалысын қалай жариялауға болады? | int data = 304871; | ### Instruction:
Unity тілінде 304871 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 304871; |
43,848,676 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 1944 високосным. | public bool IsLeap() {
int y = 1944;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1944 високосным.
### Response:
public bool IsLeap() {
int y = 1944;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
551,128 | kk | C# | factorial | advanced | C# тілінде 4360 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4360)); | ### Instruction:
C# тілінде 4360 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4360)); |
90,077,227 | 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();
} |
70,627,532 | kk | C# | array_ops | advanced | C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
1,738,351 | kk | Python | var_decl | beginner | Python тілінде 486607 мәнімен index айнымалысын қалай жариялауға болады? | index = 486607 | ### Instruction:
Python тілінде 486607 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 486607 |
713,418 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 7996. | 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(7996) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 7996.
### 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(7996) << std::endl; |
56,092,795 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 204 простым. | function isPrime() {
let n = 204;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 204 простым.
### Response:
function isPrime() {
let n = 204;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
42,623,566 | 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;
} |
53,287,379 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 282 is prime in C++. | public bool IsPrime() {
int n = 282;
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 282 is prime in C++.
### Response:
public bool IsPrime() {
int n = 282;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.