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 |
|---|---|---|---|---|---|---|---|
18,009,345 | 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;
} |
63,314,717 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2072 is a leap year in JavaScript. | function isLeap() {
let y = 2072;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2072 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2072;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,957,651 | ru | C# | var_decl | beginner | Как объявить переменную buffer со значением 28341 в C#? | int buffer = 28341; | ### Instruction:
Как объявить переменную buffer со значением 28341 в C#?
### Response:
int buffer = 28341; |
4,461,277 | kk | Java | var_decl | beginner | Java тілінде 703194 мәнімен health айнымалысын қалай жариялауға болады? | int health = 703194; | ### Instruction:
Java тілінде 703194 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 703194; |
33,740,249 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2035 високосным. | public bool IsLeap() {
int y = 2035;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2035 високосным.
### Response:
public bool IsLeap() {
int y = 2035;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
29,509,243 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
38,772,976 | 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;
} |
77,147,369 | 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;
} |
3,713,987 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 504947 в C++? | int health = 504947; | ### Instruction:
Как объявить переменную health со значением 504947 в C++?
### Response:
int health = 504947; |
4,989,701 | en | Python | var_decl | beginner | How to declare a variable level with value 179899 in Python? | level = 179899 | ### Instruction:
How to declare a variable level with value 179899 in Python?
### Response:
level = 179899 |
253,316 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 2924. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2924)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 2924.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2924)) |
1,961,304 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 521807 в Python? | score = 521807 | ### Instruction:
Как объявить переменную score со значением 521807 в Python?
### Response:
score = 521807 |
24,940,344 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 3 простым. | function isPrime() {
let n = 3;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 3 простым.
### Response:
function isPrime() {
let n = 3;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
85,455,103 | en | Unity | string_ops | advanced | Write a function that counts vowels in a text in Unity. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
35,321,914 | 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] |
69,017,595 | kk | 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;
} |
87,416,059 | 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;
} |
540,462 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 8311. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(8311)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 8311.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(8311)) |
55,983,609 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
62,600,956 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1983 is a leap year in JavaScript. | function isLeap() {
let y = 1983;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1983 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1983;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
436,113 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 9804. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9804)); | ### Instruction:
Write a function in C# that calculates the factorial of 9804.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9804)); |
63,766,710 | en | Python | logic_ops | intermediate | Write logic to check if the year 2021 is a leap year in Python. | def is_leap():
year = 2021
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2021 is a leap year in Python.
### Response:
def is_leap():
year = 2021
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
66,334,867 | kk | 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,922,968 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 301175 in JavaScript? | let total = 301175; | ### Instruction:
How to declare a variable total with value 301175 in JavaScript?
### Response:
let total = 301175; |
25,853,663 | en | C++ | logic_ops | advanced | Write a function that determines if the number 61 is prime in C++. | public bool IsPrime() {
int n = 61;
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 61 is prime in C++.
### Response:
public bool IsPrime() {
int n = 61;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
59,464,135 | 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;
} |
3,868,797 | ru | JavaScript | var_decl | beginner | Как объявить переменную data со значением 722030 в JavaScript? | let data = 722030; | ### Instruction:
Как объявить переменную data со значением 722030 в JavaScript?
### Response:
let data = 722030; |
2,348,699 | kk | Python | var_decl | beginner | Python тілінде 477999 мәнімен offset айнымалысын қалай жариялауға болады? | offset = 477999 | ### Instruction:
Python тілінде 477999 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
offset = 477999 |
88,351 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4652. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(4652)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4652.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(4652)); |
47,607,207 | en | Unity | logic_ops | advanced | Write logic to check if the year 1917 is a leap year in Unity. | public bool IsLeap() {
int y = 1917;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1917 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1917;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,225,441 | kk | Python | var_decl | beginner | Python тілінде 739613 мәнімен index айнымалысын қалай жариялауға болады? | index = 739613 | ### Instruction:
Python тілінде 739613 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 739613 |
30,678,734 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 328 простым. | public bool IsPrime() {
int n = 328;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 328 простым.
### Response:
public bool IsPrime() {
int n = 328;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
93,559,657 | kk | C# | array_ops | advanced | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,245,722 | kk | Python | var_decl | beginner | Python тілінде 544680 мәнімен count айнымалысын қалай жариялауға болады? | count = 544680 | ### Instruction:
Python тілінде 544680 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
count = 544680 |
75,656,805 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 309 простым. | def is_prime():
n = 309
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 309 простым.
### Response:
def is_prime():
n = 309
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
1,628,522 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 728301 в JavaScript? | let index = 728301; | ### Instruction:
Как объявить переменную index со значением 728301 в JavaScript?
### Response:
let index = 728301; |
36,824,790 | 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;
} |
88,758,269 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
411,845 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 5229-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5229));
} | ### Instruction:
Unity тілінде 1-ден 5229-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5229));
} |
79,284,786 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 58 простым. | public bool IsPrime() {
int n = 58;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 58 простым.
### Response:
public bool IsPrime() {
int n = 58;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,528,021 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 602724 в Unity? | int count = 602724; | ### Instruction:
Как объявить переменную count со значением 602724 в Unity?
### Response:
int count = 602724; |
47,585,859 | kk | C# | logic_ops | intermediate | C# тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
47,671,076 | 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;
} |
30,784,626 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
3,424,890 | kk | Unity | var_decl | beginner | Unity тілінде 764918 мәнімен data айнымалысын қалай жариялауға болады? | int data = 764918; | ### Instruction:
Unity тілінде 764918 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 764918; |
15,855,109 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 17 простым. | 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:
Напишите на C++ функцию, определяющую, является ли число 17 простым.
### 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;
} |
605,913 | ru | C# | var_decl | beginner | Как объявить переменную speed со значением 143173 в C#? | int speed = 143173; | ### Instruction:
Как объявить переменную speed со значением 143173 в C#?
### Response:
int speed = 143173; |
83,704,884 | en | C# | string_ops | intermediate | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
4,649,500 | ru | Unity | var_decl | beginner | Как объявить переменную health со значением 463828 в Unity? | int health = 463828; | ### Instruction:
Как объявить переменную health со значением 463828 в Unity?
### Response:
int health = 463828; |
30,960,143 | ru | 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;
} |
36,314,079 | 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аеёиоуыэюя') |
1,935,325 | kk | Python | var_decl | beginner | Python тілінде 913767 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 913767 | ### Instruction:
Python тілінде 913767 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 913767 |
2,325,907 | ru | Java | var_decl | beginner | Как объявить переменную score со значением 330328 в Java? | int score = 330328; | ### Instruction:
Как объявить переменную score со значением 330328 в Java?
### Response:
int score = 330328; |
66,141,133 | 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;
} |
88,162,024 | 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); |
39,369,763 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2074 is a leap year in C++. | public bool IsLeap() {
int y = 2074;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2074 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2074;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
48,720,302 | en | JavaScript | array_ops | advanced | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
4,272,938 | en | JavaScript | var_decl | beginner | How to declare a variable data with value 643679 in JavaScript? | let data = 643679; | ### Instruction:
How to declare a variable data with value 643679 in JavaScript?
### Response:
let data = 643679; |
78,033,549 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
33,272,654 | en | Unity | string_ops | advanced | Write a function that counts vowels in a text in Unity. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
12,050,184 | en | JavaScript | array_ops | advanced | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
457,869 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 4789. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4789)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 4789.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4789)); |
253,315 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 5939. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5939)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 5939.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5939)); |
4,751,438 | en | C++ | var_decl | beginner | How to declare a variable speed with value 383032 in C++? | int speed = 383032; | ### Instruction:
How to declare a variable speed with value 383032 in C++?
### Response:
int speed = 383032; |
38,301,687 | en | Python | string_ops | advanced | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
13,566,362 | 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] |
99,091,858 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
1,302,241 | en | Unity | var_decl | beginner | How to declare a variable speed with value 487731 in Unity? | int speed = 487731; | ### Instruction:
How to declare a variable speed with value 487731 in Unity?
### Response:
int speed = 487731; |
31,937,395 | en | C# | logic_ops | advanced | Write logic to check if the year 2084 is a leap year in C#. | public bool IsLeap() {
int y = 2084;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2084 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2084;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
15,729,692 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2049 is a leap year in JavaScript. | function isLeap() {
let y = 2049;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2049 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2049;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,014,370 | kk | Java | var_decl | beginner | Java тілінде 532045 мәнімен result айнымалысын қалай жариялауға болады? | int result = 532045; | ### Instruction:
Java тілінде 532045 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 532045; |
80,699,980 | ru | C# | array_ops | advanced | Напишите на C# функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C# функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,888,255 | ru | Unity | var_decl | beginner | Как объявить переменную result со значением 871414 в Unity? | int result = 871414; | ### Instruction:
Как объявить переменную result со значением 871414 в Unity?
### Response:
int result = 871414; |
1,500,384 | kk | Python | var_decl | beginner | Python тілінде 704838 мәнімен health айнымалысын қалай жариялауға болады? | health = 704838 | ### Instruction:
Python тілінде 704838 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
health = 704838 |
96,859,688 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 369 простым. | public bool IsPrime() {
int n = 369;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 369 простым.
### Response:
public bool IsPrime() {
int n = 369;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
39,819,384 | 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;
} |
2,453,967 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 994244 в Java? | int size = 994244; | ### Instruction:
Как объявить переменную size со значением 994244 в Java?
### Response:
int size = 994244; |
2,000,705 | kk | Java | var_decl | beginner | Java тілінде 952247 мәнімен health айнымалысын қалай жариялауға болады? | int health = 952247; | ### Instruction:
Java тілінде 952247 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 952247; |
31,903,769 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 2012 високосным. | function isLeap() {
let y = 2012;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2012 високосным.
### Response:
function isLeap() {
let y = 2012;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
48,391,067 | en | C# | string_ops | advanced | 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();
} |
4,568,017 | kk | Java | var_decl | beginner | Java тілінде 98493 мәнімен value айнымалысын қалай жариялауға болады? | int value = 98493; | ### Instruction:
Java тілінде 98493 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 98493; |
1,482,887 | en | C++ | var_decl | beginner | How to declare a variable limit with value 765851 in C++? | int limit = 765851; | ### Instruction:
How to declare a variable limit with value 765851 in C++?
### Response:
int limit = 765851; |
21,843,798 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
2,076,783 | kk | Java | var_decl | beginner | Java тілінде 462983 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 462983; | ### Instruction:
Java тілінде 462983 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 462983; |
952,013 | kk | Unity | var_decl | beginner | Unity тілінде 486165 мәнімен total айнымалысын қалай жариялауға болады? | int total = 486165; | ### Instruction:
Unity тілінде 486165 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 486165; |
94,204,952 | kk | Java | logic_ops | intermediate | Java тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
87,077,371 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
3,778,245 | kk | Unity | var_decl | beginner | Unity тілінде 218814 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 218814; | ### Instruction:
Unity тілінде 218814 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 218814; |
62,880,649 | kk | Unity | logic_ops | advanced | Unity тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 72;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 72;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
68,404,618 | 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;
} |
4,262,330 | en | Unity | var_decl | beginner | How to declare a variable limit with value 524240 in Unity? | int limit = 524240; | ### Instruction:
How to declare a variable limit with value 524240 in Unity?
### Response:
int limit = 524240; |
2,744,785 | kk | C# | var_decl | beginner | C# тілінде 117474 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 117474; | ### Instruction:
C# тілінде 117474 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 117474; |
54,846,359 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
17,460,600 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 2018 високосным. | public bool IsLeap() {
int y = 2018;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2018 високосным.
### Response:
public bool IsLeap() {
int y = 2018;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,866,512 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 850473 мәнімен index айнымалысын қалай жариялауға болады? | let index = 850473; | ### Instruction:
JavaScript тілінде 850473 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
let index = 850473; |
313,399 | kk | Python | var_decl | beginner | Python тілінде 45000 мәнімен level айнымалысын қалай жариялауға болады? | level = 45000 | ### Instruction:
Python тілінде 45000 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
level = 45000 |
50,068,770 | kk | Python | logic_ops | intermediate | Python тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2072
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2072
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
4,554,220 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 602745 в C++? | int y = 602745; | ### Instruction:
Как объявить переменную y со значением 602745 в C++?
### Response:
int y = 602745; |
53,763,910 | en | Unity | array_ops | intermediate | Write a function that finds the maximum number in an array in Unity. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,629,808 | en | Unity | var_decl | beginner | How to declare a variable buffer with value 540373 in Unity? | int buffer = 540373; | ### Instruction:
How to declare a variable buffer with value 540373 in Unity?
### Response:
int buffer = 540373; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.