id int64 0 100M | language stringclasses 3
values | prog_lang stringclasses 6
values | category stringclasses 10
values | difficulty stringclasses 3
values | instruction stringlengths 30 86 | output stringlengths 7 192 | text stringlengths 92 300 |
|---|---|---|---|---|---|---|---|
1,878,948 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 376920 в JavaScript? | let rate = 376920; | ### Instruction:
Как объявить переменную rate со значением 376920 в JavaScript?
### Response:
let rate = 376920; |
99,871,890 | 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;
} |
43,895,496 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
88,335,259 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
2,053,939 | kk | Python | var_decl | beginner | Python тілінде 41143 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 41143 | ### Instruction:
Python тілінде 41143 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 41143 |
95,856,858 | 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] |
65,051,249 | en | Python | string_ops | advanced | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
258,792 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 6466-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6466));
} | ### Instruction:
Unity тілінде 1-ден 6466-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6466));
} |
1,496,722 | ru | Python | var_decl | beginner | Как объявить переменную x со значением 918350 в Python? | x = 918350 | ### Instruction:
Как объявить переменную x со значением 918350 в Python?
### Response:
x = 918350 |
1,979,921 | kk | Java | var_decl | beginner | Java тілінде 626366 мәнімен health айнымалысын қалай жариялауға болады? | int health = 626366; | ### Instruction:
Java тілінде 626366 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 626366; |
3,714,868 | ru | Unity | var_decl | beginner | Как объявить переменную offset со значением 592902 в Unity? | int offset = 592902; | ### Instruction:
Как объявить переменную offset со значением 592902 в Unity?
### Response:
int offset = 592902; |
70,571,800 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 141 простым. | public bool IsPrime() {
int n = 141;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 141 простым.
### Response:
public bool IsPrime() {
int n = 141;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
10,620,921 | 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;
} |
17,633 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 3081. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(3081));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 3081.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(3081));
} |
65,625,600 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1998 is a leap year in Unity. | public bool IsLeap() {
int y = 1998;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1998 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1998;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,630,521 | kk | Java | var_decl | beginner | Java тілінде 819899 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 819899; | ### Instruction:
Java тілінде 819899 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 819899; |
1,967,268 | ru | C++ | var_decl | beginner | Как объявить переменную weight со значением 629381 в C++? | int weight = 629381; | ### Instruction:
Как объявить переменную weight со значением 629381 в C++?
### Response:
int weight = 629381; |
4,764,782 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 372681 в Unity? | int x = 372681; | ### Instruction:
Как объявить переменную x со значением 372681 в Unity?
### Response:
int x = 372681; |
62,233,751 | kk | Unity | array_ops | intermediate | 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;
} |
734,347 | kk | Python | var_decl | beginner | Python тілінде 700402 мәнімен rate айнымалысын қалай жариялауға болады? | rate = 700402 | ### Instruction:
Python тілінде 700402 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
rate = 700402 |
365,286 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 4572-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4572)) | ### Instruction:
Python тілінде 1-ден 4572-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4572)) |
82,775,658 | en | Java | string_ops | advanced | 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;
} |
69,851,716 | en | Python | string_ops | advanced | Write a function that checks if a string is a palindrome in Python. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Write a function that checks if a string is a palindrome in Python.
### Response:
def is_palindrome(s):
return s == s[::-1] |
48,921,559 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
1,995,592 | en | C++ | var_decl | beginner | How to declare a variable buffer with value 62030 in C++? | int buffer = 62030; | ### Instruction:
How to declare a variable buffer with value 62030 in C++?
### Response:
int buffer = 62030; |
1,232,640 | ru | C# | var_decl | beginner | Как объявить переменную score со значением 697299 в C#? | int score = 697299; | ### Instruction:
Как объявить переменную score со значением 697299 в C#?
### Response:
int score = 697299; |
24,708,290 | en | Unity | array_ops | advanced | 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;
} |
48,597,245 | en | Python | logic_ops | advanced | Write logic to check if the year 2012 is a leap year in Python. | def is_leap():
year = 2012
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2012 is a leap year in Python.
### Response:
def is_leap():
year = 2012
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
16,967,800 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 125 простым. | function isPrime() {
let n = 125;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 125 простым.
### Response:
function isPrime() {
let n = 125;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,198,670 | en | Unity | var_decl | beginner | How to declare a variable speed with value 284531 in Unity? | int speed = 284531; | ### Instruction:
How to declare a variable speed with value 284531 in Unity?
### Response:
int speed = 284531; |
1,004,041 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 710202 мәнімен offset айнымалысын қалай жариялауға болады? | let offset = 710202; | ### Instruction:
JavaScript тілінде 710202 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
let offset = 710202; |
26,092,533 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1944 високосным. | def is_leap():
year = 1944
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1944 високосным.
### Response:
def is_leap():
year = 1944
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
42,873,544 | kk | 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;
} |
437,404 | ru | C++ | var_decl | beginner | Как объявить переменную value со значением 715729 в C++? | int value = 715729; | ### Instruction:
Как объявить переменную value со значением 715729 в C++?
### Response:
int value = 715729; |
38,469,260 | 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(); |
70,320,168 | 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;
} |
2,099,144 | kk | Java | var_decl | beginner | Java тілінде 117510 мәнімен level айнымалысын қалай жариялауға болады? | int level = 117510; | ### Instruction:
Java тілінде 117510 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 117510; |
257,637 | kk | Unity | factorial | advanced | Unity тілінде 6657 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6657));
} | ### Instruction:
Unity тілінде 6657 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6657));
} |
596,606 | kk | Python | var_decl | beginner | Python тілінде 91993 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 91993 | ### Instruction:
Python тілінде 91993 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 91993 |
75,887,158 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 198 is prime in JavaScript. | function isPrime() {
let n = 198;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 198 is prime in JavaScript.
### Response:
function isPrime() {
let n = 198;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
95,624,394 | en | Unity | logic_ops | advanced | Write logic to check if the year 1919 is a leap year in Unity. | public bool IsLeap() {
int y = 1919;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1919 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1919;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
12,676,309 | en | Python | logic_ops | advanced | 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) |
35,052,639 | 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;
} |
61,702,408 | 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;
} |
3,582,011 | en | Java | var_decl | beginner | How to declare a variable total with value 233396 in Java? | int total = 233396; | ### Instruction:
How to declare a variable total with value 233396 in Java?
### Response:
int total = 233396; |
69,358,919 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
51,422,111 | kk | C++ | logic_ops | advanced | C++ тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
14,903,622 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1913 високосным. | def is_leap():
year = 1913
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1913 високосным.
### Response:
def is_leap():
year = 1913
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
82,473,320 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
25,770,383 | en | JavaScript | array_ops | intermediate | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
3,928,427 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 19086 in JavaScript? | let total = 19086; | ### Instruction:
How to declare a variable total with value 19086 in JavaScript?
### Response:
let total = 19086; |
1,357,616 | ru | Python | var_decl | beginner | Как объявить переменную data со значением 331532 в Python? | data = 331532 | ### Instruction:
Как объявить переменную data со значением 331532 в Python?
### Response:
data = 331532 |
52,963,922 | kk | Unity | logic_ops | advanced | Unity тилінде 448 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 448;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 448 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 448;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
515,348 | ru | Python | var_decl | beginner | Как объявить переменную weight со значением 893715 в Python? | weight = 893715 | ### Instruction:
Как объявить переменную weight со значением 893715 в Python?
### Response:
weight = 893715 |
53,111,662 | 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; |
27,848,028 | en | Python | logic_ops | intermediate | Write logic to check if the year 2077 is a leap year in Python. | def is_leap():
year = 2077
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2077 is a leap year in Python.
### Response:
def is_leap():
year = 2077
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
65,798,865 | 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;
} |
3,628,642 | en | JavaScript | var_decl | beginner | How to declare a variable weight with value 237572 in JavaScript? | let weight = 237572; | ### Instruction:
How to declare a variable weight with value 237572 in JavaScript?
### Response:
let weight = 237572; |
4,056,819 | ru | Unity | var_decl | beginner | Как объявить переменную rate со значением 485041 в Unity? | int rate = 485041; | ### Instruction:
Как объявить переменную rate со значением 485041 в Unity?
### Response:
int rate = 485041; |
81,119,861 | 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;
} |
195,053 | ru | JavaScript | var_decl | beginner | Как объявить переменную result со значением 447056 в JavaScript? | let result = 447056; | ### Instruction:
Как объявить переменную result со значением 447056 в JavaScript?
### Response:
let result = 447056; |
26,348,221 | kk | 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;
} |
76,930,960 | en | Python | string_ops | advanced | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
45,771,001 | en | Unity | logic_ops | advanced | Write logic to check if the year 1975 is a leap year in Unity. | public bool IsLeap() {
int y = 1975;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1975 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1975;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,105,859 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 639615 мәнімен index айнымалысын қалай жариялауға болады? | let index = 639615; | ### Instruction:
JavaScript тілінде 639615 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
let index = 639615; |
64,911,014 | en | Java | logic_ops | intermediate | Write a function that determines if the number 59 is prime in Java. | public bool IsPrime() {
int n = 59;
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 59 is prime in Java.
### Response:
public bool IsPrime() {
int n = 59;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
430,260 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 4129. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4129));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 4129.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4129));
} |
3,489,267 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 361990 в Unity? | int value = 361990; | ### Instruction:
Как объявить переменную value со значением 361990 в Unity?
### Response:
int value = 361990; |
2,248,440 | en | C# | var_decl | beginner | How to declare a variable y with value 488642 in C#? | int y = 488642; | ### Instruction:
How to declare a variable y with value 488642 in C#?
### Response:
int y = 488642; |
4,634,335 | ru | JavaScript | var_decl | beginner | Как объявить переменную buffer со значением 837793 в JavaScript? | let buffer = 837793; | ### Instruction:
Как объявить переменную buffer со значением 837793 в JavaScript?
### Response:
let buffer = 837793; |
73,060,467 | 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;
} |
66,781,276 | 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;
} |
77,504,352 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
24,535,087 | 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;
} |
85,697,327 | 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();
} |
53,512,382 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 1916 високосным. | public bool IsLeap() {
int y = 1916;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1916 високосным.
### Response:
public bool IsLeap() {
int y = 1916;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,327,991 | en | C# | var_decl | beginner | How to declare a variable index with value 246250 in C#? | int index = 246250; | ### Instruction:
How to declare a variable index with value 246250 in C#?
### Response:
int index = 246250; |
3,976,516 | kk | C# | var_decl | beginner | C# тілінде 798299 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 798299; | ### Instruction:
C# тілінде 798299 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 798299; |
4,250,186 | kk | C# | var_decl | beginner | C# тілінде 704884 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 704884; | ### Instruction:
C# тілінде 704884 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 704884; |
13,798,551 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
460,647 | kk | C++ | factorial | advanced | C++ тілінде 5879 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(5879) << std::endl; | ### Instruction:
C++ тілінде 5879 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(5879) << std::endl; |
45,301,621 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
79,210,713 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 232 простым. | public bool IsPrime() {
int n = 232;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 232 простым.
### Response:
public bool IsPrime() {
int n = 232;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
15,278,835 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1977 is a leap year in C++. | public bool IsLeap() {
int y = 1977;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1977 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1977;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,563 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 2155. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2155)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 2155.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2155)); |
31,548,948 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 31 простым. | 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:
Напишите на C# функцию, определяющую, является ли число 31 простым.
### 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;
} |
4,031,235 | en | Unity | var_decl | beginner | How to declare a variable y with value 609558 in Unity? | int y = 609558; | ### Instruction:
How to declare a variable y with value 609558 in Unity?
### Response:
int y = 609558; |
75,437,332 | en | Java | logic_ops | advanced | Write a function that determines if the number 17 is prime in Java. | public bool IsPrime() {
int n = 17;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 17 is prime in Java.
### Response:
public bool IsPrime() {
int n = 17;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
20,520,825 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
3,870,333 | kk | C++ | var_decl | beginner | C++ тілінде 416583 мәнімен count айнымалысын қалай жариялауға болады? | int count = 416583; | ### Instruction:
C++ тілінде 416583 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 416583; |
80,678,516 | 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аеёиоуыэюя') |
84,619,111 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 248 is prime in Unity. | public bool IsPrime() {
int n = 248;
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 248 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 248;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,560,474 | kk | Unity | var_decl | beginner | Unity тілінде 104218 мәнімен x айнымалысын қалай жариялауға болады? | int x = 104218; | ### Instruction:
Unity тілінде 104218 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 104218; |
2,696,157 | en | Java | var_decl | beginner | How to declare a variable buffer with value 546610 in Java? | int buffer = 546610; | ### Instruction:
How to declare a variable buffer with value 546610 in Java?
### Response:
int buffer = 546610; |
79,684,802 | kk | 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;
} |
969,988 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 256-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(256)) | ### Instruction:
Python тілінде 1-ден 256-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(256)) |
4,793,767 | en | C# | var_decl | beginner | How to declare a variable rate with value 545427 in C#? | int rate = 545427; | ### Instruction:
How to declare a variable rate with value 545427 in C#?
### Response:
int rate = 545427; |
68,455,300 | ru | Java | array_ops | intermediate | Напишите на 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;
} |
109,456 | kk | Java | factorial | advanced | Java тілінде 2086 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2086)); | ### Instruction:
Java тілінде 2086 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2086)); |
4,264,000 | ru | Unity | var_decl | beginner | Как объявить переменную buffer со значением 787788 в Unity? | int buffer = 787788; | ### Instruction:
Как объявить переменную buffer со значением 787788 в Unity?
### Response:
int buffer = 787788; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.