Earnest Codes Profile Banner
Earnest Codes Profile
Earnest Codes

@Earnesto037

Followers
1,723
Following
269
Media
1,007
Statuses
18,843

Learn Python, repeat! 🐍 |Hacks for beginners!| Down to earth guy the rules of the game are typically mine! #CFC 💙 #PythonEnthusiast #BigData #ML #Tutor

Kakamega, Kenya
Joined January 2022
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
Pinned Tweet
@Earnesto037
Earnest Codes
27 days
found out today that credit card numbers are validated by an algo called "Luhn's Algorithm"
Tweet media one
5
13
40
@Earnesto037
Earnest Codes
10 months
@polo_kimanii Hii imenasa Omwami, we camp here and wait! 😁
3
1
132
@Earnesto037
Earnest Codes
1 year
@TreyUTD7 Exactly innit @Earnesto037 🤙
0
0
101
@Earnesto037
Earnest Codes
1 year
@polo_kimanii Try mSpy Cell Phone Tracker, mSpy is a comprehensive monitoring tool that offers various features, including phone tracking. It provides real-time location information and can be used for tracking purposes.
6
11
103
@Earnesto037
Earnest Codes
1 year
@polo_kimani Lakini Kimani hii ndio kichwa unategemea kusolve differential calculus, ama kuna ingine!? 😂
3
0
47
@Earnesto037
Earnest Codes
1 year
@polo_kimanii Hyo 4inch, mkwenjele yako nani alikupea kama sio God!?😂
4
1
46
@Earnesto037
Earnest Codes
9 months
@clcoding Follow the breakdown to understand what's happening here ;👇 1. Original Dictionary: original_dict = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5} This is your starting dictionary with lowercase keys ('a', 'b', 'c', 'd', 'e') and corresponding values (1, 2, 3, 4, 5).
Tweet media one
3
4
43
@Earnesto037
Earnest Codes
1 year
@kafangi The trolls though, too much democracy! 😂😂😂
1
0
38
@Earnesto037
Earnest Codes
1 month
@clcoding The correct output is True. Here's a breakdown of why:🧵 Understanding `is` in Python: * The `is` operator in Python checks if two variables refer to the same object in memory. * It doesn't compare the values of the variables, but rather their identities. Analyzing the code:
1
5
37
@Earnesto037
Earnest Codes
1 year
@polo_kimani The goal was to prove that it is possible to go from having nothing to achieving success within one year. However, after 5 months, 2 out of the 4 individuals gave up on the endeavor. 💡This scenario highlights the challenges and difficulties that can
2
1
34
@Earnesto037
Earnest Codes
11 months
Why Python is the best programming language!? 😁
Tweet media one
3
6
35
@Earnesto037
Earnest Codes
1 year
@iamjuddah Let's do a back to back smashing @Earnesto037 ! ✅
0
0
30
@Earnesto037
Earnest Codes
9 months
How much do you know about Data Hiding in Python!? 🤔 - Data hiding is a mechanism in Python that allows you to restrict access to some of an object's components, preventing the accidental modification or misuse of sensitive information. This is
3
7
32
@Earnesto037
Earnest Codes
5 months
@RealBenjizo Option B) 24 let's break down this code together: 1. Defining the function func(x): def func(x): - This line defines a function named func that takes one input, x. 2. What the function does: It checks if x is less than or equal to 1 (x <= 1). If it is (if x <= 1:), the function
Tweet media one
3
1
33
@Earnesto037
Earnest Codes
9 months
Here are some Python pro tips and tricks for working with dictionaries, update your brain's Database. 1. Dictionary Initialization: Use dictionary comprehensions for concise initialization.
Tweet media one
1
8
29
@Earnesto037
Earnest Codes
1 year
@VibeWithShinski @Kotsocha_ke @njambifever Ang'o marach kodi omera! 😆😆😆
2
0
31
@Earnesto037
Earnest Codes
2 months
@clcoding The output is 10 Understanding the Code Step-by-Step🧵 What does the code do? This Python code defines a function named sum and then calls it with the argument 4. The function calculates the sum of all natural numbers up to the given number. Breaking Down the Code
Tweet media one
2
6
31
@Earnesto037
Earnest Codes
11 months
Happy Python Monday, 🐍🙋‍♂️📝 Introduction to Data Handling in Python: Week 2. Python is a versatile programming language that allows you to work with various data types. In this introduction, we'll explore the fundamental data types for data handling: 1. Numbers:
2
4
30
@Earnesto037
Earnest Codes
9 months
@clcoding Blank output. The output is blank because the slicing range [2:2] doesn't include any elements. In Python, when specifying a slice, the ending index is exclusive, so [2:2] doesn't include the character at index 2. Therefore, the result is an empty string.
Tweet media one
3
0
29
@Earnesto037
Earnest Codes
11 months
Couldn't agree more than this, who says no!!? 😆😆😆
Tweet media one
4
3
30
@Earnesto037
Earnest Codes
6 months
@clcoding The output is m. Let's break it down step by step:👇 1. `s = 'completed'`: This line assigns the string `'completed'` to the variable `s`. 2. `s[2:5:3]`: This is called slicing. It extracts a substring from the original string `s`. - The first number `2` indicates
Tweet media one
4
2
29
@Earnesto037
Earnest Codes
2 months
@RealBenjizo Option B). Did not find Alice. Why!? 🧵 1. Creating the User Dictionary: user = {"name": "Alice", "age": 30} creates a dictionary named user. Dictionaries are collections of key-value pairs, similar to lists but using unique keys to access values.
Tweet media one
3
5
30
@Earnesto037
Earnest Codes
2 months
If you want to become a world-class programmer (in 8 months), read these books:
3
6
28
@Earnesto037
Earnest Codes
9 months
Happy Friday Py coders, Let's continue exploring more lambda concepts.💻☕🐍 Concept 8: Nested Lambda Functions - Lambda functions can be nested within other functions, providing a concise way to create complex expressions.
Tweet media one
4
3
28
@Earnesto037
Earnest Codes
1 year
@ittybittybabyy1 Let's link up @Earnesto037 for instant engagements and moots, yes we can! 🤙
0
0
26
@Earnesto037
Earnest Codes
1 month
@clcoding The output is 1 2 3 Let's understand what's happening here:🧵 Code Breakdown: number = 5 if number == 5: print("1") if number > 0: print("2") if number > 3: print("3") Step-by-Step Explanation: Variable Initialization: The code starts by creating a variable named number and
Tweet media one
9
2
27
@Earnesto037
Earnest Codes
9 months
@clcoding Option D): xyz, abc Here's the reasoning; 1. `a = {'name': 'abc'}`: A dictionary `a` is created with a key `'name'` and value `'abc'`. 2. `b = a`: The variable `b` is assigned the reference to the same dictionary as `a`. So, `a` and `b` point to the same dictionary object.
Tweet media one
1
0
27
@Earnesto037
Earnest Codes
1 year
@Thapz__ Let's link up @Earnesto037 for back to back gains! 🔥🔥🔥
0
0
27
@Earnesto037
Earnest Codes
1 month
@clcoding The output is 2 Code Breakdown:🧵 Step-by-Step Explanation: Variable Assignment: The code starts by assigning the value 15 to the variable num. This means that num now represents the number 15. Conditional Check (if): The if statement checks if the
Tweet media one
1
2
26
@Earnesto037
Earnest Codes
6 months
🐍 Attention Python enthusiasts! Exciting news - starting tomorrow, I'll be delving into a detailed exploration of intermediate Python topics. From OOPS to Data Structures, Comprehensions, and more, there's something for everyone! Make sure you're following @Earnesto037 for more
6
1
24
@Earnesto037
Earnest Codes
4 months
@RealBenjizo Option C).10 Why!? Let's see! 🧵 Step-by-Step Explanation: Creating a List: my_list = ["Hello", 1, 3, 4, 7, "World"] This line creates a list named my_list. A list is an ordered collection of items, similar to a shopping list. Here, the list contains various
Tweet media one
2
2
24
@Earnesto037
Earnest Codes
1 year
@clcoding Answer B). [20] Let's go through the code step by step: 👉Step 1: Initializing the List The code starts by initializing a list called `c` with four elements: 20, 40, 60, and 80. ```python c = [20, 40, 60, 80] ``` 👉Step 2: Removing Elements from the List
1
0
25
@Earnesto037
Earnest Codes
10 months
@clcoding Option C) [1, 2, 0, 3] The remove() method removes the first occurrence of the specified element from the list. In this case, the element to be removed is 0. The original list is [1, 0, 2, 0, 3], so the first occurrence of 0 is at index 1.
Tweet media one
0
0
24
@Earnesto037
Earnest Codes
10 months
Python Pro tips you need to know; Pro tip 1: ✍️Pro Tip: Use Decorators for More Powerful and Flexible Functions 🎯Function decorators, are a powerful tool in Python that allow you to **modify the behavior of existing functions** without changing their source code. They
2
5
24
@Earnesto037
Earnest Codes
11 months
Sleep for 8 hours, not 6. Exercise for 1 hour, not 4. Learn for 3 hours, not 10. Read for 1 hour, not 5. Deep work for 2 hours, not 6. You're a human, not a machine.👨‍💻🏋️‍♀️
2
5
25
@Earnesto037
Earnest Codes
11 months
Damn! Do you people try this!? 😆
Tweet media one
3
3
23
@Earnesto037
Earnest Codes
9 months
@clcoding Answer 17 Here's the reasoning; 1. Initial Call: The code starts with print(test(4, 7)), calling the test function with i = 4 and j = 7. 2. Recursive Calls: Since i is not 0, the else block executes, leading to a recursive call: test(3, 11).
Tweet media one
3
1
24
@Earnesto037
Earnest Codes
9 months
What do you know about Files in Python, Let's start with a basic overview of file input. - File Input and Output in Python a). Reading from a File -To read from a file, you can use the 'open()' function to open the file and the 'read()' method to retrieve its content.
Tweet media one
5
7
24
@Earnesto037
Earnest Codes
1 year
@clcoding Answer C). 66 Let's break down the Python code and explain the output step by step: ```python c = {1: 23, 2: 89, 2: 66} print(c.pop(2)) ``` 👉Initializing the Dictionary In the first line, we initialize a dictionary named `c` with three key-value pairs. The keys are `1`,
2
2
21
@Earnesto037
Earnest Codes
10 months
Functions are a very powerful tool in Python. They allow you to group together related code and reuse it easily. Functions can also be used to create complex and sophisticated programs. If you are new to Python, I encourage you to learn more about functions. They are one of the
2
3
23
@Earnesto037
Earnest Codes
1 year
@polo_kimanii Let's do it the Python way, you can adjust different levels of chaos! 😂😂😏
Tweet media one
1
0
24
@Earnesto037
Earnest Codes
11 months
Almost 39 days left in 2023. • Go online • study anything you want • write about it on the internet • make money • and live a happy life.
Tweet media one
3
2
24
@Earnesto037
Earnest Codes
1 year
0
0
23
@Earnesto037
Earnest Codes
3 months
Mastering Data Cleaning in Python: A Step-by-Step Guide Are you tired of dealing with messy data in Python? Look no further! In this post, I'll walk you through the step-by-step process of cleaning messy data using Python. Let's dive in. 🧵 1. Import Libraries and Load Data:
2
6
23
@Earnesto037
Earnest Codes
1 year
@kingkalalaKE Let's go with the slogan, "Connect, influence and empower" link up guys @Earnesto037 😁✌️✌️
0
0
22
@Earnesto037
Earnest Codes
1 year
@kingkalalaKE @Earnesto037 let's link up! ✔️✔️✔️
1
0
20
@Earnesto037
Earnest Codes
9 months
@clcoding - I combined the 'if' and 'else' branches into a single line using the ternary conditional expression (x if condition else y). - The condition is x == y, and if it's true, it prints 'x and y are equal', otherwise it prints 'x and y are not equal'.
Tweet media one
0
1
22
@Earnesto037
Earnest Codes
10 months
A Python Code to generate samples from Gaussian(0,1) Distribution using TensorFlow.
Tweet media one
1
5
22
@Earnesto037
Earnest Codes
1 year
@amerix With a 2inch mkwenjele you can't have the audacity and energy of drilling the modern lady, not even a single second because they've been excavated to overwhelming depths! 😎
3
0
21
@Earnesto037
Earnest Codes
2 months
@clcoding The answer is 15 Understanding the Code Step-by-Step🧵 What is a Class? A class is like a blueprint for creating objects. It defines the properties (attributes) and behaviors (methods) that objects of that class will have.   Breaking Down the Code 1. class Keyboard:
Tweet media one
4
2
19
@Earnesto037
Earnest Codes
1 year
@kingkalalaKE Let's massively link up @Earnesto037 and spread the love widely! 🔥🔥🔥
1
0
21
@Earnesto037
Earnest Codes
2 months
@clcoding 12 18 Understanding the Code Step-by-Step 🧵 What is a Class? A class is like a blueprint for creating objects. In this code, Product is a class. It's a simple one that doesn't do anything yet, but we'll use it to create objects representing products.
Tweet media one
1
3
22
@Earnesto037
Earnest Codes
11 months
Happy New Week Py geeks! 🐍👨‍💻 Let's leverage, Classes and modules in Python with their detailed beginner-friendly explanations, hand typed codes with their outputs. 🧵 👉Modules in Python Modules are files in Python that contain Python code. They are
1
6
21
@Earnesto037
Earnest Codes
9 months
2024 and Python Mastery goes to another level … here we go! 🐍🥶 Happy new year to all of you guys… wishing you health and happiness. Thoughts to all those who might be experiencing a difficult time🤗 No matter how hard it's keep tyring! Thanks to all your support. 🐍
3
3
20
@Earnesto037
Earnest Codes
11 months
@clcoding here you go! 😉 def print_pattern(rows): for i in range(1, rows + 1): print('*' * i) for i in range(rows - 1, 0, -1): print('*' * i) # Set the number of rows num_rows = 5 # Call the function with the specified number of rows print_pattern(num_rows)
1
0
18
@Earnesto037
Earnest Codes
26 days
@RealBenjizo Option B). 11 Let's understand what's happening here :🧵 Code Breakdown: Step-by-Step Explanation: Outer Function Definition: The outer_func function takes an argument x. Inside this function, a new function called inner_func is defined. Inner Function Definition:
Tweet media one
1
2
22
@Earnesto037
Earnest Codes
8 months
Guys it has been a long time, let me hope you're doing well though! 😁
11
0
21
@Earnesto037
Earnest Codes
9 months
Additional concepts related to file handling in Python. a). Using Context Managers (with Statement) -The with statement is used to automatically manage the opening and closing of files. It ensures proper cleanup and resource management.
Tweet media one
2
6
21
@Earnesto037
Earnest Codes
9 months
Happy Py coding Thursday, let's look at advanced concepts with lambda functions in Python.😎 Concept 1: Lambda Basics - Lambda functions are concise, anonymous functions defined using the lambda keyword. They can take any number of arguments but have only one expression.
Tweet media one
4
3
19
@Earnesto037
Earnest Codes
11 months
Are you into databases!? 🤔Here are types databases!
Tweet media one
1
3
21
@Earnesto037
Earnest Codes
6 months
"Object-Oriented Programming (OOP) is a powerful programming paradigm that allows developers to create modular and reusable code. Objects have attributes (variables) and methods (functions). Python supports OOP through classes and objects. a). Classes and Objects:
2
5
20
@Earnesto037
Earnest Codes
6 months
@JohnAlvinMensa1 Kindly check your Dm for clarification. 👍
1
1
1
@Earnesto037
Earnest Codes
11 months
Do you write better code at night or during the day? 😁
Tweet media one
6
2
20
@Earnesto037
Earnest Codes
4 months
@clcoding The right answer is 10 14 Why!? 🧵 Code Breakdown: 1. `num = 10`: This line creates a variable named `num` and assigns the initial value `10` to it. This variable will store the number we'll be working with in the loop. 2. `while num < 20:`: This line starts
Tweet media one
2
1
19
@Earnesto037
Earnest Codes
11 months
Hello Python Friday! 🙋‍♂️🐍🥶 Let's explore dictionaries in more detail with well-explained examples. 1. Dictionary Length: You can find the number of key-value pairs in a dictionary using the len() function.
Tweet media one
1
6
19
@Earnesto037
Earnest Codes
11 months
Dictionaries Cont'd, 🐍🙋‍♂️ let's continue exploring advanced concepts related to dictionaries with detailed examples and their outputs. 1. Dictionary Comprehension with Zip: You can create dictionaries by zipping two lists together. This is useful for mapping keys to values.
Tweet media one
4
4
20
@Earnesto037
Earnest Codes
11 months
@clcoding 👉When the `antigravity` module is imported, it does not produce any visible output or display anything on the screen. Instead, it opens a web browser and redirects it to a comic strip page from the XKCD webcomic. The comic strip page that is opened is known as
1
0
20
@Earnesto037
Earnest Codes
9 months
@clcoding In Python, a module is a single file containing Python definitions and statements. It can define functions, classes, and variables that can be reused in other Python files by importing the module. For example, let's create a module named 'math_operations.py':
Tweet media one
1
5
18
@Earnesto037
Earnest Codes
9 months
@RealBenjizo Option c). False The output is `False` because each call to `my_dict.values()` creates a new iterable object. Although both calls generate iterables with the same content ("John" in this case), they are distinct objects in memory. Therefore, comparing
Tweet media one
1
1
20
@Earnesto037
Earnest Codes
11 months
In my OPINION, as a DATA ANALYST you don't need to overwhelm yourself to learn SQL.🤔 You only need this much:👇🧵 1. Intro to SQL - Definition - Purpose - Relational DBs - DBMS 2. Basic SQL Syntax - SELECT - FROM - WHERE - ORDER BY - GROUP BY 3. Data Types - Integer
3
6
17
@Earnesto037
Earnest Codes
1 year
Hello Python Tuesday, 🙋‍♂️🐍💪 Today we'll heavily leverage sets! Introduction to Set and Frozenset 👉A set is a collection of unique elements, often used in Python for various operations that require distinct values. Sets are mutable, meaning you can modify their
3
3
18
@Earnesto037
Earnest Codes
10 months
GitHub cheat sheet! ✍️
Tweet media one
0
5
19
@Earnesto037
Earnest Codes
1 year
@kingkalalaKE Yes, we rise by pulling and dusting each other, let's link up @Earnesto037 for instant engagements! ✔️🙏
0
0
19
@Earnesto037
Earnest Codes
11 months
@RealBenjizo Answer C). 10 👉This code performs a few operations on a list called `my_list` and then prints the sum of two values that were removed from the list using the `pop()` method. 👉First, let's break down the code step by step: 1. `my_list = ["Hello", 1, 3, 4, 7,
2
1
17
@Earnesto037
Earnest Codes
1 month
Python is widely used in the field of data science due to its versatility, extensive libraries, and community support. Luckily, You can master Python from the top companies and Universities. Google Data Analytics: 🔗 1. Python for Everybody
2
5
19
@Earnesto037
Earnest Codes
10 months
@RealBenjizo Answer C). 10 Why, let's break it down for clarity; 1. Function Call: `outer_func(4)` - `x` is set to 4. - `y` is calculated as 1 + 4, resulting in `y = 5`. - The function returns the inner function `inner_func`. 2. Function Call:`results()`
Tweet media one
2
0
18
@Earnesto037
Earnest Codes
1 year
0
0
18
@Earnesto037
Earnest Codes
1 year
Welcome to Python Wednesday,🙋‍♂️🐍🚀 Today, we'll dive into dictionaries, a powerful data structure. Let's start with the basics: 👉Introduction to Dictionaries: A dictionary is a collection of key-value pairs, where each key is unique and used to access its
5
3
18
@Earnesto037
Earnest Codes
11 months
Tweet media one
1
1
16
@Earnesto037
Earnest Codes
11 months
@RealBenjizo Answer B). 24 👉Explanation of the Code The given code defines a function named `func` that takes a single parameter `x`. The function uses recursion to calculate the factorial of `x` and returns the result. 🎯Here's a step-by-step breakdown of how the code works:
1
1
17
@Earnesto037
Earnest Codes
11 months
@clcoding Answer C). 5 👉To understand why this is the case, it is important to understand how the bool() function works in Python. The bool() function takes a single argument and returns True if the argument is true and False if the argument is false. In Python, any non-empty string is
3
0
15
@Earnesto037
Earnest Codes
11 months
@RealBenjizo Answer A). 2 The code defines a function called `my_dict` and then calls that function using `print(my_dict())`. 👉 Let's break down what happens in this code and explain its output. 👉Function Definition: The code begins by defining a function called `my_dict` using the
2
0
17
@Earnesto037
Earnest Codes
11 months
@RealBenjizo Answer C). Goodbye 👉Let's analyze the code and explain its output step by step: 1. The code defines a function called `unusual_func` that takes a single parameter `x`, which is expected to be a list. 2. The `if all(x):` statement checks
1
1
16
@Earnesto037
Earnest Codes
4 months
@RealBenjizo Option A). {'grandma' :4, 'grandpa' :5} I'd be glad to explain why the code outputs {'grandma': 4, 'grandpa': 5}: 🧵 Step-by-Step Breakdown: Initial Dictionary: You create a dictionary named d with three key-value pairs: 'mom': 1 'dad': 2 'son': 3 modify_dict Function:
Tweet media one
10
1
17
@Earnesto037
Earnest Codes
1 year
@polo_kimanii These people don't feel anything Kimani wakiamua kurudisha mkono hyo pesa inarudi yoote, just hiking call rates per minutes and they already have billions straight in their banks!
1
0
17
@Earnesto037
Earnest Codes
10 months
As a programmer - how many apples do you count? 😁
Tweet media one
8
2
18
@Earnesto037
Earnest Codes
10 months
Happy Holidays guys how good are you on Classes in Python, Here's a Christmas Tree Generator program using Classes in Python! 👨‍💻🐍🎯
Tweet media one
3
5
18
@Earnesto037
Earnest Codes
3 months
@clcoding The answer is large Why!? 🧵 Code Breakdown: Class Definition (OSDevice): This code defines a class named OSDevice. Classes are blueprints for creating objects with specific attributes (properties) and methods (functions). The OSDevice class doesn't have
Tweet media one
3
3
18
@Earnesto037
Earnest Codes
11 months
Learn a tech skill Learn a tech skill Learn a tech skill Learn a tech skill Learn a tech skill Learn a tech skill Please learn a tech skill, I beg you, I’ve seen it, that you’ll make it big over there 😭😭😭. Say what you wish to learn, I can help! 😁
2
2
18
@Earnesto037
Earnest Codes
1 year
@CFCMamo @Earnesto037 am a super retwitter and follower, asap! 🤙
2
0
18
@Earnesto037
Earnest Codes
1 year
@Python_Dv A). True. Let's break down the code step by step for a beginner in Python: 📌We start by defining three variables: - `no` is assigned the value `True`. - `yes` is assigned the value `False`. - `never` is assigned the value `True`. 📌Next, we have an expression: ```
1
1
16
@Earnesto037
Earnest Codes
1 year
@Evanmemba Let's link hii hasira ya chelsea kulose itulie, let's massively engage @Earnesto037 ! ✔️
0
1
16
@Earnesto037
Earnest Codes
9 months
Let's explore some advanced concepts and algorithms that showcase their versatility and power! -Trees: Height and Depth: a). Height: The length of the longest path from the root to any leaf node. b). Depth: The depth of a node is its distance from the root node. Illustration;
Tweet media one
1
2
17