کداکسپلور | CodeExplore
7.91K subscribers
1.96K photos
314 videos
103 files
1.74K links
با کد اکسپلور یاد بگیر، لذت ببر و بروز باش ⚡️😉

سایت کد‌اکسپلور:
CodeExplore.ir
👨🏻‍💻 ارتباط با ما :
@CodeExploreSup
گروه :
@CodeExplore_Gap
تبلیغات در کد اکسپلور :
@CodeExploreAds
Download Telegram
خروج این کد پایتون کدوم گزینه هستش؟

def mystery_function(lst):
return sorted(set(lst), key=lambda x: (-lst.count(x), x))

sample_list = [3, 1, 2, 2, 3, 3, 1, 4, 4, 4, 4]
result = mystery_function(sample_list)
print(result)


#python #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥6❤‍🔥32
خروجی این کد سی شارپ کدوم گزینه هستش؟

using System;

class Program
{
static void Main()
{
int[] numbers = { 1, 2, 3, 4, 5 };
int result = 0;

for (int i = 0; i < numbers.Length; i++)
{
if (i % 2 == 0)
{
result += numbers[i] * numbers[i];
}
else
{
result -= numbers[i];
}
}

Console.WriteLine(result);
}
}


#csharp #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
❤‍🔥53🔥2😁1
خروجی کد ++C زیر کدوم گزینه هست؟

#include <iostream>
using namespace std;

void mysteryFunction(int &a, int b) {
a = a * b;
b = a + b;
}

int main() {
int x = 2, y = 3;
mysteryFunction(x, y);
cout << "x = " << x << ", y = " << y << endl;
return 0;
}


#cpp #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
6❤‍🔥4🔥3
خروجی کد پایتون زیر کدوم گزینه هست؟

def tricky_function(a, b=[]):
b.append(a)
return b

list1 = tricky_function(1)
list2 = tricky_function(2, [])
list3 = tricky_function(3)

print(list1)
print(list2)
print(list3)


#python #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
5❤‍🔥3🔥3
خروجی کد جاوااسکریپت کدوم گزینه هست؟

const value = 0.1 + 0.2;
console.log(value === 0.3);


#js #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥8❤‍🔥33😁3
خروجی کد جاوااسکریپت زیر کدوم گزینه هست ؟

let foo = null;
console.log(foo === null);
console.log(typeof foo === 'object');


#challenge #javascript
@CodeExplore
🔥113❤‍🔥3😁1
خروجی این کد پایتون کدوم گزینست؟

def compute_value(a, b):
if a % 2 == 0:
result = a * b
if result % 3 == 0:
return result // 3
else:
return result + 3
else:
result = a + b
if result % 5 == 0:
return result // 5
else:
return result - 5

output = compute_value(8, 7)
print(output)

#python #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
12🔥3❤‍🔥2
خروجی این کد کدوم گزینست؟

#include <iostream>
using namespace std;

void modify(int &x, int &y, int z) {
x += z;
y -= z;
z *= 2;
}

int main() {
int a = 10;
int b = 20;
int c = 5;

modify(a, b, c);
cout << a << " " << b << " " << c << endl;

modify(a, b, c);
cout << a << " " << b << " " << c << endl;

return 0;
}


a)
15 15 5
20 10 5

b)
15 15 10
30 0 10

c)
15 15 5
25 10 5

d)
20 10 5
30 0 5

#cpp #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
9🔥6❤‍🔥4😁3
خروجی این کد پایتون کدوم گزینست؟

def mystery_function(n):
if n == 0:
return 0
elif n % 2 == 0:
return mystery_function(n // 2)
else:
return 1 + mystery_function(n // 2)

print(mystery_function(10))


#python #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
❤‍🔥83🔥3
سایت HackerRank یک پلتفرم آنلاین برای تمرین و بهبود مهارت‌های برنامه‌نویسی هستش. این سایت شامل چالش‌های کدنویسی توی موضوعات مختلف مثل الگوریتم‌ها، پایگاه‌داده‌ها، هوش مصنوعی و ریاضیاته. همچنین، HackerRank به کاربرا اجازه میده در مسابقات کدنویسی شرکت کنن و برای آماده‌سازی مصاحبه‌های شغلی از تست‌های تکنیکی استفاده کنن.

#programming #challenge
☕️ @CodeExplore
Please open Telegram to view this post
VIEW IN TELEGRAM
15❤‍🔥3🔥3