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,439,444
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,098,449
ru
Python
var_decl
beginner
Как объявить переменную data со значением 531864 в Python?
data = 531864
### Instruction: Как объявить переменную data со значением 531864 в Python? ### Response: data = 531864
1,746,240
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 128239 в JavaScript?
let total = 128239;
### Instruction: Как объявить переменную total со значением 128239 в JavaScript? ### Response: let total = 128239;
361,484
kk
Python
var_decl
beginner
Python тілінде 945496 мәнімен score айнымалысын қалай жариялауға болады?
score = 945496
### Instruction: Python тілінде 945496 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 945496
69,787,445
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);
31,699,498
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аеёиоуыэюя')
22,401,505
kk
C++
array_ops
intermediate
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; }
29,838,856
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
49,549,037
en
Python
array_ops
intermediate
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)
447,134
kk
C#
var_decl
beginner
C# тілінде 887409 мәнімен index айнымалысын қалай жариялауға болады?
int index = 887409;
### Instruction: C# тілінде 887409 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 887409;
2,144,205
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 90889 in JavaScript?
let limit = 90889;
### Instruction: How to declare a variable limit with value 90889 in JavaScript? ### Response: let limit = 90889;
579,326
kk
C++
var_decl
beginner
C++ тілінде 681934 мәнімен score айнымалысын қалай жариялауға болады?
int score = 681934;
### Instruction: C++ тілінде 681934 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 681934;
379,116
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 953091 в Unity?
int size = 953091;
### Instruction: Как объявить переменную size со значением 953091 в Unity? ### Response: int size = 953091;
64,915,508
ru
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); }
37,887,272
en
C++
array_ops
intermediate
Write a function that finds the maximum number in an array in C++.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,598,729
kk
C++
var_decl
beginner
C++ тілінде 895841 мәнімен count айнымалысын қалай жариялауға болады?
int count = 895841;
### Instruction: C++ тілінде 895841 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 895841;
84,327,868
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; }
1,285,920
en
C#
var_decl
beginner
How to declare a variable timer with value 756380 in C#?
int timer = 756380;
### Instruction: How to declare a variable timer with value 756380 in C#? ### Response: int timer = 756380;
64,774,839
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; }
28,829,791
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
3,193,060
en
C++
var_decl
beginner
How to declare a variable result with value 969143 in C++?
int result = 969143;
### Instruction: How to declare a variable result with value 969143 in C++? ### Response: int result = 969143;
4,233,387
en
Java
var_decl
beginner
How to declare a variable timer with value 608329 in Java?
int timer = 608329;
### Instruction: How to declare a variable timer with value 608329 in Java? ### Response: int timer = 608329;
3,075,484
kk
Unity
var_decl
beginner
Unity тілінде 476502 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 476502;
### Instruction: Unity тілінде 476502 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 476502;
35,690,176
en
Python
logic_ops
advanced
Write logic to check if the year 2075 is a leap year in Python.
def is_leap(): year = 2075 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2075 is a leap year in Python. ### Response: def is_leap(): year = 2075 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
72,985,477
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(); }
74,785,231
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]
4,761,683
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 620715 в C#?
int speed = 620715;
### Instruction: Как объявить переменную speed со значением 620715 в C#? ### Response: int speed = 620715;
60,987,380
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 134 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 134; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 134 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 134; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
88,638,261
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
19,909,196
ru
Unity
string_ops
intermediate
Напишите на 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: Напишите на 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; }
159,401
kk
Unity
factorial
advanced
Unity тілінде 6009 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6009)); }
### Instruction: Unity тілінде 6009 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6009)); }
35,792,689
en
C#
array_ops
advanced
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); }
613,017
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 1700.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1700)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 1700. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1700)); }
96,566,748
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(); }
15,322,268
kk
Java
string_ops
advanced
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
69,150,038
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 380 простым.
public bool IsPrime() { int n = 380; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 380 простым. ### Response: public bool IsPrime() { int n = 380; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
90,864,660
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1921 високосным.
public bool IsLeap() { int y = 1921; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1921 високосным. ### Response: public bool IsLeap() { int y = 1921; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,673,432
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
36,455,774
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; }
57,719,843
kk
Python
logic_ops
advanced
Python тилінде 16 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 16 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 16 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 16 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,386,727
kk
Java
var_decl
beginner
Java тілінде 311607 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 311607;
### Instruction: Java тілінде 311607 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 311607;
62,532,978
kk
Unity
array_ops
advanced
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
90,150,818
kk
C#
logic_ops
advanced
C# тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2019; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2019; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,280,474
en
Java
logic_ops
intermediate
Write logic to check if the year 1967 is a leap year in Java.
public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1967 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,516,718
kk
C#
array_ops
advanced
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
18,201,836
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; }
42,748,376
kk
C#
array_ops
advanced
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
57,133,470
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()
253,820
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 5172.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5172))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 5172. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5172))
31,688,897
kk
C#
array_ops
advanced
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
44,846,465
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 455 простым.
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: Напишите на C# функцию, определяющую, является ли число 455 простым. ### 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; }
164,699
en
Java
var_decl
beginner
How to declare a variable y with value 684420 in Java?
int y = 684420;
### Instruction: How to declare a variable y with value 684420 in Java? ### Response: int y = 684420;
4,876,615
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 810990 в JavaScript?
let y = 810990;
### Instruction: Как объявить переменную y со значением 810990 в JavaScript? ### Response: let y = 810990;
21,813,019
en
C#
logic_ops
advanced
Write a function that determines if the number 241 is prime in C#.
public bool IsPrime() { int n = 241; 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 241 is prime in C#. ### Response: public bool IsPrime() { int n = 241; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
73,046,502
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
11,568,681
en
C++
string_ops
intermediate
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; }
73,718,871
en
C++
logic_ops
intermediate
Write a function that determines if the number 142 is prime in C++.
public bool IsPrime() { int n = 142; 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 142 is prime in C++. ### Response: public bool IsPrime() { int n = 142; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
15,901,687
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
2,458,572
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 996494 в C++?
int limit = 996494;
### Instruction: Как объявить переменную limit со значением 996494 в C++? ### Response: int limit = 996494;
71,140,606
ru
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; }
51,773,552
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; }
2,584,156
kk
Java
var_decl
beginner
Java тілінде 386101 мәнімен data айнымалысын қалай жариялауға болады?
int data = 386101;
### Instruction: Java тілінде 386101 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 386101;
2,945,619
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 949915 в JavaScript?
let y = 949915;
### Instruction: Как объявить переменную y со значением 949915 в JavaScript? ### Response: let y = 949915;
73,266,850
kk
Unity
logic_ops
advanced
Unity тилінде 2016 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2016 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,473,848
kk
JavaScript
var_decl
beginner
JavaScript тілінде 831957 мәнімен data айнымалысын қалай жариялауға болады?
let data = 831957;
### Instruction: JavaScript тілінде 831957 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 831957;
60,802,278
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,267,646
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(); }
711,141
ru
C#
var_decl
beginner
Как объявить переменную value со значением 552505 в C#?
int value = 552505;
### Instruction: Как объявить переменную value со значением 552505 в C#? ### Response: int value = 552505;
11,534,117
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2062 високосным.
function isLeap() { let y = 2062; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2062 високосным. ### Response: function isLeap() { let y = 2062; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
1,432,175
kk
C++
var_decl
beginner
C++ тілінде 439570 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 439570;
### Instruction: C++ тілінде 439570 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 439570;
1,729,633
kk
Unity
var_decl
beginner
Unity тілінде 807963 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 807963;
### Instruction: Unity тілінде 807963 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 807963;
1,735,380
en
C++
var_decl
beginner
How to declare a variable offset with value 215398 in C++?
int offset = 215398;
### Instruction: How to declare a variable offset with value 215398 in C++? ### Response: int offset = 215398;
3,231,600
en
C++
var_decl
beginner
How to declare a variable result with value 64474 in C++?
int result = 64474;
### Instruction: How to declare a variable result with value 64474 in C++? ### Response: int result = 64474;
1,444,926
en
C#
var_decl
beginner
How to declare a variable y with value 151340 in C#?
int y = 151340;
### Instruction: How to declare a variable y with value 151340 in C#? ### Response: int y = 151340;
4,223,729
en
JavaScript
var_decl
beginner
How to declare a variable size with value 455209 in JavaScript?
let size = 455209;
### Instruction: How to declare a variable size with value 455209 in JavaScript? ### Response: let size = 455209;
302,512
en
Java
var_decl
beginner
How to declare a variable amount with value 448303 in Java?
int amount = 448303;
### Instruction: How to declare a variable amount with value 448303 in Java? ### Response: int amount = 448303;
51,562,736
kk
C++
array_ops
advanced
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,986,726
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 825176 in JavaScript?
let rate = 825176;
### Instruction: How to declare a variable rate with value 825176 in JavaScript? ### Response: let rate = 825176;
62,793,323
kk
Unity
logic_ops
advanced
Unity тилінде 461 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 461; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 461 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 461; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
919,584
ru
Python
var_decl
beginner
Как объявить переменную count со значением 321920 в Python?
count = 321920
### Instruction: Как объявить переменную count со значением 321920 в Python? ### Response: count = 321920
218,772
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 4698-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4698)); }
### Instruction: Unity тілінде 1-ден 4698-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4698)); }
14,484,409
kk
Java
logic_ops
intermediate
Java тилінде 479 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 479; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 479 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 479; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
64,493,251
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 372 простым.
def is_prime(): n = 372 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 372 простым. ### Response: def is_prime(): n = 372 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
79,276,218
en
Python
array_ops
intermediate
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)
58,086,738
en
Unity
logic_ops
advanced
Write a function that determines if the number 8 is prime in Unity.
public bool IsPrime() { int n = 8; 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 8 is prime in Unity. ### Response: public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
75,737,752
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 367 простым.
public bool IsPrime() { int n = 367; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 367 простым. ### Response: public bool IsPrime() { int n = 367; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
21,283,086
kk
Java
logic_ops
advanced
Java тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,920,727
kk
Unity
var_decl
beginner
Unity тілінде 893788 мәнімен x айнымалысын қалай жариялауға болады?
int x = 893788;
### Instruction: Unity тілінде 893788 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 893788;
54,723,508
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
67,502,696
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1932 is a leap year in JavaScript.
function isLeap() { let y = 1932; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1932 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1932; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
69,169
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 8213.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8213)); }
### Instruction: Write a function in Unity that calculates the factorial of 8213. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8213)); }
4,604,711
en
JavaScript
var_decl
beginner
How to declare a variable result with value 395625 in JavaScript?
let result = 395625;
### Instruction: How to declare a variable result with value 395625 in JavaScript? ### Response: let result = 395625;
1,089,680
kk
Python
var_decl
beginner
Python тілінде 651317 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 651317
### Instruction: Python тілінде 651317 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 651317
26,202,679
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,533,232
en
JavaScript
var_decl
beginner
How to declare a variable health with value 543171 in JavaScript?
let health = 543171;
### Instruction: How to declare a variable health with value 543171 in JavaScript? ### Response: let health = 543171;
18,768,861
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; }
711,603
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 529834 в JavaScript?
let score = 529834;
### Instruction: Как объявить переменную score со значением 529834 в JavaScript? ### Response: let score = 529834;
80,058,916
en
Unity
array_ops
intermediate
Write a function that finds the maximum number in an array in Unity.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
93,013,358
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
4,849,519
en
JavaScript
var_decl
beginner
How to declare a variable x with value 832815 in JavaScript?
let x = 832815;
### Instruction: How to declare a variable x with value 832815 in JavaScript? ### Response: let x = 832815;