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 |
|---|---|---|---|---|---|---|---|
58,906,151 | en | JavaScript | string_ops | advanced | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
134,760 | kk | Python | factorial | advanced | Python тілінде 3390 санының факториалын есептейтін функция жаз. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3390)) | ### Instruction:
Python тілінде 3390 санының факториалын есептейтін функция жаз.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3390)) |
3,123,719 | kk | Unity | var_decl | beginner | Unity тілінде 170520 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 170520; | ### Instruction:
Unity тілінде 170520 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 170520; |
23,030,156 | 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);
} |
44,701,951 | kk | Java | array_ops | advanced | Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
56,011,979 | 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;
} |
4,917,294 | en | JavaScript | var_decl | beginner | How to declare a variable health with value 713923 in JavaScript? | let health = 713923; | ### Instruction:
How to declare a variable health with value 713923 in JavaScript?
### Response:
let health = 713923; |
273,463 | ru | Unity | var_decl | beginner | Как объявить переменную data со значением 207923 в Unity? | int data = 207923; | ### Instruction:
Как объявить переменную data со значением 207923 в Unity?
### Response:
int data = 207923; |
24,829,528 | kk | 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;
} |
447,072 | kk | Java | sum_n | intermediate | Java тілінде 1-ден 904-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(904)); | ### Instruction:
Java тілінде 1-ден 904-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(904)); |
44,323,068 | en | Java | string_ops | advanced | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
69,289,842 | 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;
} |
81,497,803 | en | Java | string_ops | advanced | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
96,952,270 | kk | Unity | logic_ops | advanced | Unity тилінде 2027 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2027;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2027 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2027;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
561,591 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 3413. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3413)) | ### Instruction:
Write a function in Python that calculates the factorial of 3413.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3413)) |
4,065,044 | kk | C# | var_decl | beginner | C# тілінде 444390 мәнімен size айнымалысын қалай жариялауға болады? | int size = 444390; | ### Instruction:
C# тілінде 444390 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 444390; |
89,028,241 | en | JavaScript | array_ops | intermediate | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
192,154 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 4170. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(4170)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 4170.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(4170)); |
46,230,542 | 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(); |
30,460,076 | kk | Java | string_ops | intermediate | Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
99,682,665 | en | Java | array_ops | intermediate | Write a function that finds the maximum number in an array in Java. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
55,386,616 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2095 високосным. | public bool IsLeap() {
int y = 2095;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2095 високосным.
### Response:
public bool IsLeap() {
int y = 2095;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
32,655,764 | kk | Python | array_ops | intermediate | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
72,781,593 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 71 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 71;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 71 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 71;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
415,301 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 796. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(796)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 796.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(796)) |
80,032,850 | en | Unity | string_ops | advanced | 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();
} |
67,868,692 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,373,285 | kk | C++ | var_decl | beginner | C++ тілінде 924719 мәнімен value айнымалысын қалай жариялауға болады? | int value = 924719; | ### Instruction:
C++ тілінде 924719 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 924719; |
361,852 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 2668. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2668)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 2668.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2668)); |
4,748,294 | ru | C# | var_decl | beginner | Как объявить переменную data со значением 1944 в C#? | int data = 1944; | ### Instruction:
Как объявить переменную data со значением 1944 в C#?
### Response:
int data = 1944; |
77,042,514 | kk | Java | logic_ops | intermediate | Java тилінде 228 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 228;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 228 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 228;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,031,099 | ru | Unity | var_decl | beginner | Как объявить переменную score со значением 252775 в Unity? | int score = 252775; | ### Instruction:
Как объявить переменную score со значением 252775 в Unity?
### Response:
int score = 252775; |
215,790 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 6685. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6685));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 6685.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6685));
} |
1,203,637 | kk | C++ | factorial | advanced | C++ тілінде 9276 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9276) << std::endl; | ### Instruction:
C++ тілінде 9276 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9276) << std::endl; |
81,346,033 | en | C# | string_ops | intermediate | Write a function that converts a string to uppercase in C#. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in C#.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
55,286,035 | en | C# | logic_ops | intermediate | Write a function that determines if the number 3 is prime in C#. | public bool IsPrime() {
int n = 3;
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 3 is prime in C#.
### Response:
public bool IsPrime() {
int n = 3;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,870,888 | kk | Python | var_decl | beginner | Python тілінде 249773 мәнімен count айнымалысын қалай жариялауға болады? | count = 249773 | ### Instruction:
Python тілінде 249773 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
count = 249773 |
945,208 | kk | Unity | var_decl | beginner | Unity тілінде 612506 мәнімен x айнымалысын қалай жариялауға болады? | int x = 612506; | ### Instruction:
Unity тілінде 612506 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 612506; |
2,262,208 | kk | C++ | var_decl | beginner | C++ тілінде 798825 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 798825; | ### Instruction:
C++ тілінде 798825 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 798825; |
64,336,044 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
679,131 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 6570-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(6570) << std::endl; | ### Instruction:
C++ тілінде 1-ден 6570-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(6570) << std::endl; |
56,366,522 | 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);
} |
2,443,723 | ru | Java | var_decl | beginner | Как объявить переменную amount со значением 390101 в Java? | int amount = 390101; | ### Instruction:
Как объявить переменную amount со значением 390101 в Java?
### Response:
int amount = 390101; |
40,597,688 | en | Python | logic_ops | advanced | Write logic to check if the year 1949 is a leap year in Python. | def is_leap():
year = 1949
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1949 is a leap year in Python.
### Response:
def is_leap():
year = 1949
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
32,070,478 | 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;
} |
639,164 | ru | Unity | var_decl | beginner | Как объявить переменную speed со значением 845036 в Unity? | int speed = 845036; | ### Instruction:
Как объявить переменную speed со значением 845036 в Unity?
### Response:
int speed = 845036; |
20,147,934 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
33,018 | kk | C# | var_decl | beginner | C# тілінде 437433 мәнімен data айнымалысын қалай жариялауға болады? | int data = 437433; | ### Instruction:
C# тілінде 437433 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 437433; |
3,146,991 | en | Java | var_decl | beginner | How to declare a variable level with value 44262 in Java? | int level = 44262; | ### Instruction:
How to declare a variable level with value 44262 in Java?
### Response:
int level = 44262; |
436,125 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 7236. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7236));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 7236.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7236));
} |
18,720,988 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 1906 високосным. | public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1906 високосным.
### Response:
public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
69,788,836 | en | Python | logic_ops | intermediate | Write a function that determines if the number 411 is prime in Python. | def is_prime():
n = 411
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Write a function that determines if the number 411 is prime in Python.
### Response:
def is_prime():
n = 411
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
31,092,708 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 2077 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2077;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2077 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2077;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
89,688,745 | 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;
} |
40,359,268 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 318 простым. | public bool IsPrime() {
int n = 318;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 318 простым.
### Response:
public bool IsPrime() {
int n = 318;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
276,536 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 5029-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5029));
} | ### Instruction:
Unity тілінде 1-ден 5029-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5029));
} |
96,069,067 | 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;
} |
2,344,598 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 665534 мәнімен amount айнымалысын қалай жариялауға болады? | let amount = 665534; | ### Instruction:
JavaScript тілінде 665534 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
let amount = 665534; |
2,360,709 | ru | Python | var_decl | beginner | Как объявить переменную y со значением 709892 в Python? | y = 709892 | ### Instruction:
Как объявить переменную y со значением 709892 в Python?
### Response:
y = 709892 |
4,866,147 | en | Unity | var_decl | beginner | How to declare a variable count with value 444684 in Unity? | int count = 444684; | ### Instruction:
How to declare a variable count with value 444684 in Unity?
### Response:
int count = 444684; |
16,661,764 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 2085 is a leap year in JavaScript. | function isLeap() {
let y = 2085;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2085 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2085;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
581,781 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 6411. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6411)); | ### Instruction:
Write a function in C# that calculates the factorial of 6411.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6411)); |
34,522,768 | kk | Unity | logic_ops | intermediate | Unity тилінде 153 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 153;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 153 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 153;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,535,479 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 361139 в Python? | health = 361139 | ### Instruction:
Как объявить переменную health со значением 361139 в Python?
### Response:
health = 361139 |
1,517,896 | ru | Python | var_decl | beginner | Как объявить переменную weight со значением 497186 в Python? | weight = 497186 | ### Instruction:
Как объявить переменную weight со значением 497186 в Python?
### Response:
weight = 497186 |
52,769,835 | ru | 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;
} |
3,332,969 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 818002 in JavaScript? | let y = 818002; | ### Instruction:
How to declare a variable y with value 818002 in JavaScript?
### Response:
let y = 818002; |
64,602,820 | kk | Java | array_ops | advanced | Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
99,635,679 | kk | C++ | string_ops | advanced | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
25,921,360 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 161 простым. | public bool IsPrime() {
int n = 161;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 161 простым.
### Response:
public bool IsPrime() {
int n = 161;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
64,475,730 | kk | C# | string_ops | advanced | C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
15,323,637 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 90 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 90;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 90 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 90;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,118,053 | ru | C# | var_decl | beginner | Как объявить переменную limit со значением 203857 в C#? | int limit = 203857; | ### Instruction:
Как объявить переменную limit со значением 203857 в C#?
### Response:
int limit = 203857; |
4,080,338 | ru | Java | var_decl | beginner | Как объявить переменную weight со значением 590190 в Java? | int weight = 590190; | ### Instruction:
Как объявить переменную weight со значением 590190 в Java?
### Response:
int weight = 590190; |
89,230,543 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 1914 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1914;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1914 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1914;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
2,261,216 | ru | C# | var_decl | beginner | Как объявить переменную y со значением 673866 в C#? | int y = 673866; | ### Instruction:
Как объявить переменную y со значением 673866 в C#?
### Response:
int y = 673866; |
82,653,261 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 309 простым. | function isPrime() {
let n = 309;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 309 простым.
### Response:
function isPrime() {
let n = 309;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
44,423,454 | 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;
} |
556,106 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 4124. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4124)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 4124.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4124)); |
237,978 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 4208. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4208) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 4208.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4208) << std::endl; |
59,759,426 | 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;
} |
74,323,661 | kk | Java | logic_ops | advanced | Java тилінде 2069 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2069;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2069 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2069;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
13,348,772 | en | C# | logic_ops | advanced | Write a function that determines if the number 483 is prime in C#. | public bool IsPrime() {
int n = 483;
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 483 is prime in C#.
### Response:
public bool IsPrime() {
int n = 483;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
49,389,826 | kk | Unity | logic_ops | intermediate | Unity тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
983,284 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 7279. | 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(7279) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 7279.
### 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(7279) << std::endl; |
31,984,399 | en | C# | array_ops | advanced | 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,834,687 | ru | JavaScript | var_decl | beginner | Как объявить переменную result со значением 48008 в JavaScript? | let result = 48008; | ### Instruction:
Как объявить переменную result со значением 48008 в JavaScript?
### Response:
let result = 48008; |
29,088,061 | kk | Java | logic_ops | intermediate | Java тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
77,052,019 | 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;
} |
4,097,035 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 305398 в Python? | health = 305398 | ### Instruction:
Как объявить переменную health со значением 305398 в Python?
### Response:
health = 305398 |
60,317,355 | 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);
} |
11,402,686 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1964 високосным. | function isLeap() {
let y = 1964;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1964 високосным.
### Response:
function isLeap() {
let y = 1964;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
98,561,448 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 147 простым. | public bool IsPrime() {
int n = 147;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 147 простым.
### Response:
public bool IsPrime() {
int n = 147;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
897,077 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 4803. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4803)) | ### Instruction:
Write a function in Python that calculates the factorial of 4803.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4803)) |
40,032,919 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1915 is a leap year in C++. | public bool IsLeap() {
int y = 1915;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1915 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1915;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
24,293,076 | en | Python | logic_ops | advanced | Write a function that determines if the number 470 is prime in Python. | def is_prime():
n = 470
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Write a function that determines if the number 470 is prime in Python.
### Response:
def is_prime():
n = 470
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
32,108,553 | en | Java | array_ops | advanced | Write a function that finds the maximum number in an array in Java. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
70,536,591 | 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;
} |
3,711,876 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 244108 в C++? | int rate = 244108; | ### Instruction:
Как объявить переменную rate со значением 244108 в C++?
### Response:
int rate = 244108; |
297,892 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 8157. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8157) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 8157.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8157) << std::endl; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.