Data Science & Machine Learning
Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free For collaborations: @love_data
نمایش بیشتر📈 تحلیل کانال تلگرام Data Science & Machine Learning
کانال Data Science & Machine Learning (@datasciencefun) در بخش زبانی انگلیسی بازیگری فعال است. در حال حاضر جامعه شامل 77 285 مشترک است و جایگاه 2 004 را در دسته آموزش و رتبه 4 033 را در منطقه الهند دارد.
📊 شاخصهای مخاطب و پویایی
از زمان ایجاد در невідомо، پروژه رشد سریعی داشته و 77 285 مشترک جذب کرده است.
بر اساس آخرین دادهها در تاریخ 27 اوت, 2026، کانال فعالیت پایداری دارد. در ۳۰ روز گذشته تغییر اعضا برابر 372 و در ۲۴ ساعت گذشته برابر 1 بوده و همچنان دسترسی گستردهای حفظ شده است.
- وضعیت تأیید: تأیید نشده
- نرخ تعامل (ER): میانگین تعامل مخاطب 2.60% است و در ۲۴ ساعت نخست پس از انتشار، محتوا معمولاً 1.12% واکنش نسبت به کل مشترکان کسب میکند.
- دسترسی پستها: هر پست به طور میانگین 2 009 بازدید دریافت میکند. در اولین روز معمولاً 866 بازدید جمعآوری میشود.
- واکنشها و تعامل: مخاطبان بهطور فعال حمایت میکنند؛ میانگین واکنش به هر پست 3 است.
- علایق موضوعی: محتوا بر موضوعات کلیدی مانند learning, accuracy, distribution, panda, dataset تمرکز دارد.
📝 توضیح و سیاست محتوایی
نویسنده این فضا را محل بیان دیدگاههای شخصی توصیف میکند:
“Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free
For collaborations: @love_data”
به لطف بهروزرسانیهای پرتکرار (آخرین داده در تاریخ 28 اوت, 2026)، کانال همواره بهروز و دارای دسترسی بالاست. تحلیلها نشان میدهد مخاطبان بهطور فعال با محتوا تعامل دارند و آن را به نقطه اثرگذاری مهم در دسته آموزش تبدیل کردهاند.
def greet():
print("Welcome to Data Science!")
greet()
Output
Welcome to Data Science!🔹 2. Why Do We Use Functions? Functions help you: ✅ Avoid writing duplicate code ✅ Improve code readability ✅ Make debugging easier ✅ Reuse code in multiple places ✅ Build modular applications 🔹 3. Defining a Function Syntax
def function_name():
# Function body
Example:
def welcome():
print("Hello, World!")
welcome()
🔹 4. Function Parameters
Parameters allow you to pass information into a function.
def greet(name):
print("Hello", name)
greet("Deepak")
Output
Hello DeepakHere, "name" is called a parameter. 🔹 5. Function Arguments When calling a function, the values you pass are called arguments.
def square(number):
print(number * number)
square(5)
Output
25Here: • "number" → Parameter • "5" → Argument 🔹 6. Returning Values A function can return a value using the return keyword.
def add(a, b):
return a + b
result = add(10, 20)
print(result)
Output
30Using return allows the function's result to be stored or used later. 🔹 7. Default Parameters You can assign default values to parameters.
def greet(name="Guest"):
print("Hello", name)
greet()
greet("Rahul")
Output
Hello Guest Hello Rahul🔹 8. Multiple Return Values A function can return more than one value.
def calculate(a, b):
return a + b, a * b
sum_value, product = calculate(4, 5)
print(sum_value)
print(product)
Output
9 20🔹 9. Scope of Variables Variables created inside a function are called local variables.
def demo():
message = "Inside Function"
print(message)
demo()
Trying to access
messageoutside the function will produce an error because it exists only inside the function. 🔹 10. Built-in Functions Python provides many ready-to-use functions. Examples:
numbers = [5, 2, 8, 1]
print(len(numbers))
print(max(numbers))
print(min(numbers))
print(sum(numbers))
Output
4 8 1 16🔹 11. Real-World Data Science Example Calculate the average marks of students.
def average(marks):
return sum(marks) / len(marks)
scores = [80, 75, 92, 88]
print(average(scores))
Output
83.75Functions like this are commonly used while cleaning data, calculating statistics, and building machine learning pipelines. 🔹 12. Common Mistakes ❌ Forgetting to Call the Function
def greet():
print("Hello")
# Nothing happens because the function isn't called.
Correct:
greet()
❌ Forgetting to Return a Value
def add(a, b):
a + b
# Correct:
def add(a, b):
return a + b
🎯 Practice Questions
1. Write a function to add two numbers.
2. Create a function to calculate the square of a number.
3. Write a function that checks whether a number is even or odd.
4. Create a function to calculate the average of a list.
5. Write a function that returns the largest of three numbers.
Double Tap ❤️ For Part-7sales = [1000, 2000, 1500, 3000]
total = 0
for amount in sales:
total += amount
print(total)
Output: 7500
🔹 11. Common Mistakes
❌ Forgetting to update the loop variable
count = 1
while count <= 5:
print(count)
This creates an infinite loop because count never changes.
Correct:
count = 1
while count <= 5:
print(count)
count += 1
🎯 Practice Questions
1. Print numbers from 1 to 10 using a "for" loop
2. Print even numbers from 2 to 20
3. Find the sum of numbers from 1 to 100
4. Print all elements of a list using a loop
5. Create a multiplication table of any number using a "for" loop
🎯 Key Takeaways
✅ Use a "for" loop when the number of iterations is known
✅ Use a "while" loop when the number of iterations depends on a condition
✅ range() generates sequences of numbers
✅ break exits the loop immediately
✅ continue skips the current iteration
✅ pass acts as a placeholder
Loops are one of the most important concepts in Python. You'll use them extensively for data processing, feature engineering, machine learning, automation, and solving coding interview questions.
Double Tap ❤️ For Part-6print("Hello")
print("Hello")
print("Hello")
print("Hello")
print("Hello")
Using a loop:
for i in range(5):
print("Hello")
Both produce the same output, but the loop is much shorter and easier to maintain.
🔹 2. Types of Loops in Python
Python provides two main types of loops:
✅ "for" Loop
✅ "while" Loop
🔹 3. The "for" Loop ⭐
A "for" loop is used when you know how many times you want to repeat a task.
Syntax
for variable in sequence:
# Code to execute
Example
for i in range(5):
print(i)
Output:
0
1
2
3
4
Notice that range(5) generates numbers from 0 to 4.
🔹 4. The "range()" Function ⭐
The range() function generates a sequence of numbers.
Example 1
for i in range(5):
print(i)
Output: 0 1 2 3 4
Example 2
for i in range(1, 6):
print(i)
Output: 1 2 3 4 5
Example 3
for i in range(2, 11, 2):
print(i)
Output: 2 4 6 8 10
The third argument is called the step size.
🔹 5. Looping Through a List
fruits = ["Apple", "Banana", "Mango"]
for fruit in fruits:
print(fruit)
Output:
Apple
Banana
Mango
🔹 6. The "while" Loop ⭐
A "while" loop continues executing as long as the condition remains True.
Syntax
while condition:
# Code
Example
count = 1
while count <= 5:
print(count)
count += 1
Output: 1 2 3 4 5
🔹 7. Infinite Loop
Be careful when using "while" loops.
while True:
print("Hello")
This loop never stops unless interrupted.
Always ensure the condition eventually becomes False.
🔹 8. Loop Control Statements ⭐
"break" - Stops the loop immediately
for i in range(10):
if i == 5:
break
print(i)
Output: 0 1 2 3 4
"continue" - Skips the current iteration
for i in range(5):
if i == 2:
continue
print(i)
Output: 0 1 3 4
"pass" - Acts as a placeholder
for i in range(5):
pass
Useful when writing incomplete code.
🔹 9. Nested Loops
A loop inside another loop.
for i in range(3):
for j in range(2):
print(i, j)
Output:
0 0
0 1
1 0
1 1
2 0
2 1
🔹 10. Real-World Data Science Example
Calculate the total sales.if age >= 18:
print("Eligible")
❌ Incorrect Indentation
if age >= 18:
print("Eligible")
Python requires proper indentation.
Correct:
if age >= 18:
print("Eligible")
🔹 11. Real-World Data Science Example
prediction = 0.82
if prediction >= 0.5:
print("Spam Email")
else:
print("Not Spam")
Many Machine Learning classification models use similar logic to convert prediction probabilities into categories.
🎯 Practice Questions
1. Check whether a number is positive or negative.
2. Check whether a person is eligible to vote.
3. Create a grading system using "if...elif...else".
4. Check whether a number is even or odd.
5. Determine the largest of three numbers.
🎯 Key Takeaways
✅ Use "if" to execute code when a condition is True.
✅ Use "else" to execute code when the condition is False.
✅ Use "elif" to check multiple conditions.
✅ Nested "if" statements allow more complex decision-making.
✅ Logical operators (and, or, not) help combine conditions.
✅ The ternary operator provides a concise way to write simple "if...else" statements.
Conditional statements are the foundation of decision-making in Python and are widely used in automation, data analysis, machine learning, and AI applications.
Double Tap ❤️ For Part-5
-----
1.35 ₽ · /balance_helpif condition:
# Code to execute
Example
age = 20
if age >= 18:
print("Eligible to vote")
Output
Eligible to vote
🔹 3. The "if...else" Statement
Use "else" when you want to execute another block if the condition is False.
Example
age = 16
if age >= 18:
print("Eligible to vote")
else:
print("Not eligible to vote")
Output
Not eligible to vote
🔹 4. The "if...elif...else" Statement ⭐
Use "elif" when you need to check multiple conditions.
Example
marks = 85
if marks >= 90:
print("Grade A")
elif marks >= 75:
print("Grade B")
elif marks >= 60:
print("Grade C")
else:
print("Grade D")
Output
Grade B
Python checks conditions from top to bottom and executes the first condition that is True.
🔹 5. Nested "if" Statements
You can place one "if" statement inside another.
Example
age = 25
citizen = True
if age >= 18:
if citizen:
print("Eligible to vote")
Output
Eligible to vote
🔹 6. Using Logical Operators
Conditional statements often use logical operators.
"and"
age = 25
if age >= 18 and age <= 60:
print("Working Age")
"or"
marks = 35
if marks >= 40 or marks == 35:
print("Eligible for Grace Marks")
"not"
is_holiday = False
if not is_holiday:
print("Go to Office")
🔹 7. Checking Multiple Conditions
salary = 60000
experience = 4
if salary > 50000 and experience >= 3:
print("Eligible for Promotion")
else:
print("Not Eligible")
🔹 8. Ternary Operator ⭐
A shorter way to write an "if...else" statement.
Syntax
value_if_true if condition else value_if_false
Example
age = 20
status = "Adult" if age >= 18 else "Minor"
print(status)
Output
Adult
🔹 9. Real-World Example
temperature = 38
if temperature > 35:
print("It's a hot day.")
elif temperature >= 20:
print("Weather is pleasant.")
else:
print("It's cold.")
🔹 10. Common Mistakes
❌ Missing Colon
if age >= 18
print("Eligible")
This gives a SyntaxError.
Correct: