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
50,179,414
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1976 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1976; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1976 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1976; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,918,045
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 870040 в Unity?
int y = 870040;
### Instruction: Как объявить переменную y со значением 870040 в Unity? ### Response: int y = 870040;
4,552,937
kk
C++
var_decl
beginner
C++ тілінде 456848 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 456848;
### Instruction: C++ тілінде 456848 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 456848;
38,061,533
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 487 простым.
public bool IsPrime() { int n = 487; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 487 простым. ### Response: public bool IsPrime() { int n = 487; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
19,471,252
en
Java
logic_ops
advanced
Write a function that determines if the number 365 is prime in Java.
public bool IsPrime() { int n = 365; 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 365 is prime in Java. ### Response: public bool IsPrime() { int n = 365; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,783,553
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; }
3,425,135
en
Unity
var_decl
beginner
How to declare a variable data with value 159044 in Unity?
int data = 159044;
### Instruction: How to declare a variable data with value 159044 in Unity? ### Response: int data = 159044;
3,654,310
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 942284 в C++?
int buffer = 942284;
### Instruction: Как объявить переменную buffer со значением 942284 в C++? ### Response: int buffer = 942284;
28,704,980
kk
Python
logic_ops
intermediate
Python тилінде 1983 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1983 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1983 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1983 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
99,479,621
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
50,406,560
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; }
4,012,084
kk
JavaScript
var_decl
beginner
JavaScript тілінде 297813 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 297813;
### Instruction: JavaScript тілінде 297813 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 297813;
10,952,152
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; }
93,124,185
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
10,009,711
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; }
626,475
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 9691.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9691))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 9691. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9691))
2,114,462
kk
JavaScript
var_decl
beginner
JavaScript тілінде 59138 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 59138;
### Instruction: JavaScript тілінде 59138 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 59138;
349,012
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 3804.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3804))
### Instruction: Write a function in Python that sums numbers from 1 to 3804. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3804))
87,490,463
kk
Java
logic_ops
intermediate
Java тилінде 488 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 488; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 488 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 488; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
35,090,081
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; }
3,056,449
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 39013 в Unity?
int result = 39013;
### Instruction: Как объявить переменную result со значением 39013 в Unity? ### Response: int result = 39013;
4,633,591
kk
C#
var_decl
beginner
C# тілінде 662202 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 662202;
### Instruction: C# тілінде 662202 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 662202;
722,280
en
Python
var_decl
beginner
How to declare a variable x with value 777032 in Python?
x = 777032
### Instruction: How to declare a variable x with value 777032 in Python? ### Response: x = 777032
2,257,897
en
Unity
var_decl
beginner
How to declare a variable limit with value 266457 in Unity?
int limit = 266457;
### Instruction: How to declare a variable limit with value 266457 in Unity? ### Response: int limit = 266457;
21,642,054
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
4,420,300
en
JavaScript
var_decl
beginner
How to declare a variable size with value 530948 in JavaScript?
let size = 530948;
### Instruction: How to declare a variable size with value 530948 in JavaScript? ### Response: let size = 530948;
31,456,525
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; }
65,104,065
ru
Java
string_ops
intermediate
Напишите на 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; }
42,566,300
kk
Unity
logic_ops
advanced
Unity тилінде 1935 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1935 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,676,378
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; }
33,545,984
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 81 простым.
public bool IsPrime() { int n = 81; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 81 простым. ### Response: public bool IsPrime() { int n = 81; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,616,835
kk
Java
var_decl
beginner
Java тілінде 881232 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 881232;
### Instruction: Java тілінде 881232 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 881232;
77,335,763
en
Python
logic_ops
intermediate
Write logic to check if the year 1958 is a leap year in Python.
def is_leap(): year = 1958 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1958 is a leap year in Python. ### Response: def is_leap(): year = 1958 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,994,572
kk
C++
var_decl
beginner
C++ тілінде 953222 мәнімен index айнымалысын қалай жариялауға болады?
int index = 953222;
### Instruction: C++ тілінде 953222 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 953222;
2,263,931
kk
Python
var_decl
beginner
Python тілінде 804397 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 804397
### Instruction: Python тілінде 804397 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 804397
85,962,962
en
C#
logic_ops
advanced
Write a function that determines if the number 455 is prime in C#.
public bool IsPrime() { int n = 455; 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 455 is prime in C#. ### Response: public bool IsPrime() { int n = 455; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
30,207,024
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);
23,107,227
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; }
1,518,262
kk
JavaScript
var_decl
beginner
JavaScript тілінде 873404 мәнімен total айнымалысын қалай жариялауға болады?
let total = 873404;
### Instruction: JavaScript тілінде 873404 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 873404;
3,501,897
ru
Python
var_decl
beginner
Как объявить переменную score со значением 485962 в Python?
score = 485962
### Instruction: Как объявить переменную score со значением 485962 в Python? ### Response: score = 485962
47,966,241
en
JavaScript
string_ops
intermediate
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;
2,046,906
en
Java
var_decl
beginner
How to declare a variable score with value 965768 in Java?
int score = 965768;
### Instruction: How to declare a variable score with value 965768 in Java? ### Response: int score = 965768;
13,340,922
en
Python
logic_ops
advanced
Write a function that determines if the number 49 is prime in Python.
def is_prime(): n = 49 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 49 is prime in Python. ### Response: def is_prime(): n = 49 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,763,415
kk
C#
var_decl
beginner
C# тілінде 96475 мәнімен index айнымалысын қалай жариялауға болады?
int index = 96475;
### Instruction: C# тілінде 96475 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 96475;
54,813,396
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; }
10,835,542
kk
Python
string_ops
advanced
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
46,266,953
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
19,384,634
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; }
50,027,649
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); }
989,459
kk
JavaScript
var_decl
beginner
JavaScript тілінде 818878 мәнімен index айнымалысын қалай жариялауға болады?
let index = 818878;
### Instruction: JavaScript тілінде 818878 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 818878;
78,913,471
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; }
41,705,939
kk
C#
logic_ops
advanced
C# тилінде 362 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 362; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 362 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 362; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,646,322
en
Python
var_decl
beginner
How to declare a variable total with value 987983 in Python?
total = 987983
### Instruction: How to declare a variable total with value 987983 in Python? ### Response: total = 987983
3,194,167
en
C#
var_decl
beginner
How to declare a variable rate with value 89324 in C#?
int rate = 89324;
### Instruction: How to declare a variable rate with value 89324 in C#? ### Response: int rate = 89324;
47,611,905
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2020 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2020; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2020 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2020; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
91,997,648
kk
Unity
logic_ops
advanced
Unity тилінде 85 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 85; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 85 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 85; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,829,098
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2068 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2068; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2068 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2068; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
37,789,105
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1908 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1908; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1908 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1908; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
37,420,381
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; }
1,011,527
en
Python
var_decl
beginner
How to declare a variable timer with value 346963 in Python?
timer = 346963
### Instruction: How to declare a variable timer with value 346963 in Python? ### Response: timer = 346963
81,418,646
kk
C#
string_ops
intermediate
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,766,234
kk
Java
var_decl
beginner
Java тілінде 231569 мәнімен index айнымалысын қалай жариялауға болады?
int index = 231569;
### Instruction: Java тілінде 231569 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 231569;
728,851
ru
JavaScript
var_decl
beginner
Как объявить переменную speed со значением 862701 в JavaScript?
let speed = 862701;
### Instruction: Как объявить переменную speed со значением 862701 в JavaScript? ### Response: let speed = 862701;
27,449,371
ru
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; }
13,540,101
kk
C++
logic_ops
intermediate
C++ тилінде 238 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 238; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 238 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 238; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,295,928
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 286278 в JavaScript?
let index = 286278;
### Instruction: Как объявить переменную index со значением 286278 в JavaScript? ### Response: let index = 286278;
755,185
en
Java
var_decl
beginner
How to declare a variable health with value 627396 in Java?
int health = 627396;
### Instruction: How to declare a variable health with value 627396 in Java? ### Response: int health = 627396;
46,989,767
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
23,177,522
en
C#
logic_ops
intermediate
Write logic to check if the year 2037 is a leap year in C#.
public bool IsLeap() { int y = 2037; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2037 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2037; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
83,706,441
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
591,755
en
JavaScript
var_decl
beginner
How to declare a variable result with value 780193 in JavaScript?
let result = 780193;
### Instruction: How to declare a variable result with value 780193 in JavaScript? ### Response: let result = 780193;
41,519,415
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аеёиоуыэюя')
83,647
kk
Unity
factorial
advanced
Unity тілінде 832 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(832)); }
### Instruction: Unity тілінде 832 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(832)); }
52,437,983
kk
C++
logic_ops
advanced
C++ тилінде 2003 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2003; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2003 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2003; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
83,205,292
kk
C++
string_ops
intermediate
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
96,799,886
ru
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; }
78,539,345
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
4,123,503
ru
C#
var_decl
beginner
Как объявить переменную index со значением 58382 в C#?
int index = 58382;
### Instruction: Как объявить переменную index со значением 58382 в C#? ### Response: int index = 58382;
2,781,856
en
C#
var_decl
beginner
How to declare a variable value with value 48468 in C#?
int value = 48468;
### Instruction: How to declare a variable value with value 48468 in C#? ### Response: int value = 48468;
2,559,358
kk
Java
var_decl
beginner
Java тілінде 313452 мәнімен count айнымалысын қалай жариялауға болады?
int count = 313452;
### Instruction: Java тілінде 313452 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 313452;
395,251
ru
Java
var_decl
beginner
Как объявить переменную limit со значением 12790 в Java?
int limit = 12790;
### Instruction: Как объявить переменную limit со значением 12790 в Java? ### Response: int limit = 12790;
308,733
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 7609.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7609))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 7609. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7609))
32,666,067
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
3,909,718
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 984919 в JavaScript?
let score = 984919;
### Instruction: Как объявить переменную score со значением 984919 в JavaScript? ### Response: let score = 984919;
4,547,658
kk
Unity
var_decl
beginner
Unity тілінде 214510 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 214510;
### Instruction: Unity тілінде 214510 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 214510;
2,447,942
ru
Python
var_decl
beginner
Как объявить переменную size со значением 349051 в Python?
size = 349051
### Instruction: Как объявить переменную size со значением 349051 в Python? ### Response: size = 349051
183,517
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 5169.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5169)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 5169. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5169)); }
2,933,300
kk
Java
var_decl
beginner
Java тілінде 613502 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 613502;
### Instruction: Java тілінде 613502 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 613502;
750,063
en
C#
var_decl
beginner
How to declare a variable weight with value 664186 in C#?
int weight = 664186;
### Instruction: How to declare a variable weight with value 664186 in C#? ### Response: int weight = 664186;
46,232,504
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
13,614,088
en
Python
logic_ops
advanced
Write logic to check if the year 1938 is a leap year in Python.
def is_leap(): year = 1938 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1938 is a leap year in Python. ### Response: def is_leap(): year = 1938 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
63,208,419
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]
1,085,346
en
Java
var_decl
beginner
How to declare a variable count with value 449291 in Java?
int count = 449291;
### Instruction: How to declare a variable count with value 449291 in Java? ### Response: int count = 449291;
2,897,803
en
C++
var_decl
beginner
How to declare a variable score with value 514374 in C++?
int score = 514374;
### Instruction: How to declare a variable score with value 514374 in C++? ### Response: int score = 514374;
1,820,190
ru
C#
var_decl
beginner
Как объявить переменную score со значением 469814 в C#?
int score = 469814;
### Instruction: Как объявить переменную score со значением 469814 в C#? ### Response: int score = 469814;
3,200,777
en
Unity
var_decl
beginner
How to declare a variable offset with value 776477 in Unity?
int offset = 776477;
### Instruction: How to declare a variable offset with value 776477 in Unity? ### Response: int offset = 776477;
2,869,104
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 983378 в Unity?
int total = 983378;
### Instruction: Как объявить переменную total со значением 983378 в Unity? ### Response: int total = 983378;
33,388,265
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
84,074,858
en
JavaScript
string_ops
intermediate
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
74,867
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 4961.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4961));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 4961. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4961));