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
94,323,981
ru
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; }
276,237
kk
C++
factorial
advanced
C++ тілінде 8021 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8021) << std::endl;
### Instruction: C++ тілінде 8021 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8021) << std::endl;
53,773,961
en
C++
string_ops
advanced
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,821,713
kk
JavaScript
var_decl
beginner
JavaScript тілінде 230409 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 230409;
### Instruction: JavaScript тілінде 230409 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 230409;
77,416,924
kk
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); }
4,156,753
ru
Java
var_decl
beginner
Как объявить переменную value со значением 529516 в Java?
int value = 529516;
### Instruction: Как объявить переменную value со значением 529516 в Java? ### Response: int value = 529516;
380,663
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 8928.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8928));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 8928. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8928));
61,091,459
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 243 is prime in JavaScript.
function isPrime() { let n = 243; 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 243 is prime in JavaScript. ### Response: function isPrime() { let n = 243; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
90,163,363
en
C++
logic_ops
advanced
Write logic to check if the year 2093 is a leap year in C++.
public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2093 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
62,065,716
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2049 високосным.
def is_leap(): year = 2049 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2049 високосным. ### Response: def is_leap(): year = 2049 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,888,173
kk
Unity
var_decl
beginner
Unity тілінде 669625 мәнімен score айнымалысын қалай жариялауға болады?
int score = 669625;
### Instruction: Unity тілінде 669625 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 669625;
1,110,457
en
C++
var_decl
beginner
How to declare a variable health with value 782960 in C++?
int health = 782960;
### Instruction: How to declare a variable health with value 782960 in C++? ### Response: int health = 782960;
416,563
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 7833.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7833));
### Instruction: Write a function in C# that calculates the factorial of 7833. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7833));
41,209,036
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);
56,256,133
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
55,865,459
en
Python
array_ops
intermediate
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]
90,095,441
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 211 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 211; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 211 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 211; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
69,973,065
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; }
40,291,615
kk
C#
string_ops
intermediate
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,296,828
kk
JavaScript
var_decl
beginner
JavaScript тілінде 19868 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 19868;
### Instruction: JavaScript тілінде 19868 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 19868;
74,904,177
en
Python
string_ops
intermediate
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]
15,604,869
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2045 високосным.
public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2045 високосным. ### Response: public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
393,162
kk
Java
var_decl
beginner
Java тілінде 694268 мәнімен y айнымалысын қалай жариялауға болады?
int y = 694268;
### Instruction: Java тілінде 694268 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 694268;
4,520,496
kk
Unity
var_decl
beginner
Unity тілінде 246238 мәнімен index айнымалысын қалай жариялауға болады?
int index = 246238;
### Instruction: Unity тілінде 246238 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 246238;
60,273,880
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
1,706,695
en
Unity
var_decl
beginner
How to declare a variable index with value 640764 in Unity?
int index = 640764;
### Instruction: How to declare a variable index with value 640764 in Unity? ### Response: int index = 640764;
1,418,429
ru
JavaScript
var_decl
beginner
Как объявить переменную buffer со значением 956175 в JavaScript?
let buffer = 956175;
### Instruction: Как объявить переменную buffer со значением 956175 в JavaScript? ### Response: let buffer = 956175;
80,022,952
kk
Python
logic_ops
intermediate
Python тилінде 2089 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2089 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2089 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2089 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,721,173
kk
C++
var_decl
beginner
C++ тілінде 677478 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 677478;
### Instruction: C++ тілінде 677478 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 677478;
704,522
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 3835.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3835));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 3835. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3835));
3,444,847
en
C#
var_decl
beginner
How to declare a variable y with value 848739 in C#?
int y = 848739;
### Instruction: How to declare a variable y with value 848739 in C#? ### Response: int y = 848739;
2,332,665
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 175535 в Unity?
int limit = 175535;
### Instruction: Как объявить переменную limit со значением 175535 в Unity? ### Response: int limit = 175535;
60,922,700
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1968 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1968; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1968 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1968; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
46,974,262
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
73,935
kk
Python
sum_n
intermediate
Python тілінде 1-ден 3302-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3302))
### Instruction: Python тілінде 1-ден 3302-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3302))
29,863,935
kk
Java
logic_ops
advanced
Java тилінде 24 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 24; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 24 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 24; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
88,969,397
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,382,801
kk
C++
var_decl
beginner
C++ тілінде 813357 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 813357;
### Instruction: C++ тілінде 813357 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 813357;
14,366,523
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 120 простым.
function isPrime() { let n = 120; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 120 простым. ### Response: function isPrime() { let n = 120; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,937,323
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 191117 в Python?
buffer = 191117
### Instruction: Как объявить переменную buffer со значением 191117 в Python? ### Response: buffer = 191117
4,835,004
en
C++
var_decl
beginner
How to declare a variable weight with value 491813 in C++?
int weight = 491813;
### Instruction: How to declare a variable weight with value 491813 in C++? ### Response: int weight = 491813;
11,465,644
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 1962 високосным.
public bool IsLeap() { int y = 1962; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1962 високосным. ### Response: public bool IsLeap() { int y = 1962; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,615,947
en
Python
var_decl
beginner
How to declare a variable score with value 974798 in Python?
score = 974798
### Instruction: How to declare a variable score with value 974798 in Python? ### Response: score = 974798
20,751,645
ru
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; }
2,647,853
ru
Python
var_decl
beginner
Как объявить переменную data со значением 737558 в Python?
data = 737558
### Instruction: Как объявить переменную data со значением 737558 в Python? ### Response: data = 737558
4,807,301
en
Python
var_decl
beginner
How to declare a variable weight with value 989227 in Python?
weight = 989227
### Instruction: How to declare a variable weight with value 989227 in Python? ### Response: weight = 989227
2,401,928
en
JavaScript
var_decl
beginner
How to declare a variable size with value 647774 in JavaScript?
let size = 647774;
### Instruction: How to declare a variable size with value 647774 in JavaScript? ### Response: let size = 647774;
70,066,504
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('');
34,800,866
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
2,744,264
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 16641 in JavaScript?
let rate = 16641;
### Instruction: How to declare a variable rate with value 16641 in JavaScript? ### Response: let rate = 16641;
3,328,035
kk
C#
var_decl
beginner
C# тілінде 86215 мәнімен value айнымалысын қалай жариялауға болады?
int value = 86215;
### Instruction: C# тілінде 86215 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 86215;
76,595,163
kk
Python
logic_ops
intermediate
Python тилінде 15 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 15 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 15 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 15 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,881,419
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 643078 в C++?
int amount = 643078;
### Instruction: Как объявить переменную amount со значением 643078 в C++? ### Response: int amount = 643078;
2,218,573
kk
C#
var_decl
beginner
C# тілінде 923571 мәнімен count айнымалысын қалай жариялауға болады?
int count = 923571;
### Instruction: C# тілінде 923571 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 923571;
4,813,125
kk
Python
var_decl
beginner
Python тілінде 370593 мәнімен result айнымалысын қалай жариялауға болады?
result = 370593
### Instruction: Python тілінде 370593 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 370593
946,158
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 77954 в JavaScript?
let limit = 77954;
### Instruction: Как объявить переменную limit со значением 77954 в JavaScript? ### Response: let limit = 77954;
94,378,997
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; }
10,313,693
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(); }
90,059,353
en
Unity
logic_ops
advanced
Write a function that determines if the number 202 is prime in Unity.
public bool IsPrime() { int n = 202; 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 202 is prime in Unity. ### Response: public bool IsPrime() { int n = 202; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,155,847
kk
Java
var_decl
beginner
Java тілінде 118751 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 118751;
### Instruction: Java тілінде 118751 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 118751;
3,297,140
ru
Java
var_decl
beginner
Как объявить переменную index со значением 678921 в Java?
int index = 678921;
### Instruction: Как объявить переменную index со значением 678921 в Java? ### Response: int index = 678921;
54,926,428
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
58,859,050
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2021 is a leap year in JavaScript.
function isLeap() { let y = 2021; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2021 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2021; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
87,835,076
kk
Unity
logic_ops
intermediate
Unity тилінде 1949 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1949; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1949 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1949; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
45,172,507
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1909 високосным.
public bool IsLeap() { int y = 1909; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1909 високосным. ### Response: public bool IsLeap() { int y = 1909; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,026,390
ru
Python
var_decl
beginner
Как объявить переменную total со значением 468496 в Python?
total = 468496
### Instruction: Как объявить переменную total со значением 468496 в Python? ### Response: total = 468496
4,206,133
kk
Python
var_decl
beginner
Python тілінде 599509 мәнімен count айнымалысын қалай жариялауға болады?
count = 599509
### Instruction: Python тілінде 599509 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 599509
267,613
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 2481.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2481));
### Instruction: Write a function in Java that calculates the factorial of 2481. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2481));
74,280,687
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 430 простым.
public bool IsPrime() { int n = 430; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 430 простым. ### Response: public bool IsPrime() { int n = 430; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
43,186,448
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
136,297
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4397-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4397));
### Instruction: C# тілінде 1-ден 4397-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4397));
290,796
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 5928.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5928))
### Instruction: Write a function in Python that sums numbers from 1 to 5928. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5928))
21,743,025
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; }
98,809,324
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 450 простым.
public bool IsPrime() { int n = 450; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 450 простым. ### Response: public bool IsPrime() { int n = 450; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,793,757
en
C++
var_decl
beginner
How to declare a variable limit with value 670386 in C++?
int limit = 670386;
### Instruction: How to declare a variable limit with value 670386 in C++? ### Response: int limit = 670386;
18,311,998
kk
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); }
88,087
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 2901.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2901));
### Instruction: Write a function in JavaScript that calculates the factorial of 2901. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2901));
57,170,137
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; }
2,231,953
en
C++
var_decl
beginner
How to declare a variable count with value 555725 in C++?
int count = 555725;
### Instruction: How to declare a variable count with value 555725 in C++? ### Response: int count = 555725;
50,477,084
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,336,767
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 164999 в Unity?
int count = 164999;
### Instruction: Как объявить переменную count со значением 164999 в Unity? ### Response: int count = 164999;
4,436,514
en
C++
var_decl
beginner
How to declare a variable limit with value 760524 in C++?
int limit = 760524;
### Instruction: How to declare a variable limit with value 760524 in C++? ### Response: int limit = 760524;
3,791,283
kk
Java
var_decl
beginner
Java тілінде 808180 мәнімен value айнымалысын қалай жариялауға болады?
int value = 808180;
### Instruction: Java тілінде 808180 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 808180;
2,254,763
kk
Java
var_decl
beginner
Java тілінде 804613 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 804613;
### Instruction: Java тілінде 804613 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 804613;
4,075,697
ru
Java
var_decl
beginner
Как объявить переменную total со значением 805319 в Java?
int total = 805319;
### Instruction: Как объявить переменную total со значением 805319 в Java? ### Response: int total = 805319;
97,736,378
en
Unity
string_ops
advanced
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; }
943,877
ru
Unity
var_decl
beginner
Как объявить переменную offset со значением 81641 в Unity?
int offset = 81641;
### Instruction: Как объявить переменную offset со значением 81641 в Unity? ### Response: int offset = 81641;
16,502,879
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
99,399,300
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2022 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2022; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2022 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2022; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
35,884,215
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; }
79,067,877
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
57,361,744
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,317,569
kk
JavaScript
var_decl
beginner
JavaScript тілінде 831662 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 831662;
### Instruction: JavaScript тілінде 831662 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 831662;
44,683,006
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; }
876,137
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 933.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(933));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 933. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(933));
3,434,099
en
Java
var_decl
beginner
How to declare a variable health with value 417023 in Java?
int health = 417023;
### Instruction: How to declare a variable health with value 417023 in Java? ### Response: int health = 417023;
2,020,247
ru
C#
var_decl
beginner
Как объявить переменную value со значением 358028 в C#?
int value = 358028;
### Instruction: Как объявить переменную value со значением 358028 в C#? ### Response: int value = 358028;
56,300,062
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(); }
1,858,242
kk
Unity
var_decl
beginner
Unity тілінде 24628 мәнімен size айнымалысын қалай жариялауға болады?
int size = 24628;
### Instruction: Unity тілінде 24628 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 24628;
24,752,566
kk
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]