PythonicJourney

17 posts

PythonicJourney banner
PythonicJourney

PythonicJourney

@pythonicjourney

🐍 PythonicJourney: Exploring Python & Solving Problems 🐍 💻 Sharing python projects and problems solved.#python #pythonprogramming #coding #ml #ai #developer

Katılım Mayıs 2024
10 Takip Edilen0 Takipçiler
PythonicJourney retweetledi
Python Coding
Python Coding@clcoding·
What is the output of following Python code? empty_list = [] empty_string = "" empty_tuple = () is_none1 = empty_list is None is_none2 = empty_string is None is_none3 = empty_tuple is None print(is_none1, is_none2, is_none3)
English
15
9
50
19.4K
PythonicJourney
PythonicJourney@pythonicjourney·
@pythonclcoding Sally. `__init__` method initializes the name attribute of the People class. Instances person1 and person2 of the People class are created with names "Sally" and "Louise" respectively. `namePrint` method is called for person1 which prints the name 'Sally' to the console.
English
0
0
0
5
New Technology
New Technology@pythonclcoding·
What is the output of following Python code? class People(): def __init__(self, name): self.name = name def namePrint(self): print(self.name) person1 = People("Sally") person2 = People("Louise") person1.namePrint()
English
4
2
17
21.6K
PythonicJourney
PythonicJourney@pythonicjourney·
Guess what the following code does.
PythonicJourney tweet media
English
0
0
0
29
PythonicJourney
PythonicJourney@pythonicjourney·
@Python_Dv C. abcd The list a contains individual characters 'a', 'b', 'c', and 'd'. The join() method is used to concatenate these characters into a single string, with an empty string '' used as the separator. The resulting string 'abcd' is then printed.
English
0
0
0
5
PythonicJourney
PythonicJourney@pythonicjourney·
@Python_Dv 10. This function appears to be using recursion to find the GCD of two numbers a and b using the Euclidean algorithm. Here's how it works: If a is equal to 0, then the GCD is b. Otherwise, it recursively calls itself with b % a as the new value of a and a as the new value of b.
English
0
0
0
4
PythonicJourney
PythonicJourney@pythonicjourney·
The algorithm used in the program efficiently finds the factors of a given number and performs prime factorisation to represent the number in its simplest form. The `Simple divisor algorithm`. @pythonicjourney/a-python-project-to-find-factors-and-prime-factorisation-32b0a38c5c5a" target="_blank" rel="nofollow noopener">medium.com/@pythonicjourn
PythonicJourney tweet media
English
0
0
1
26
PythonicJourney
PythonicJourney@pythonicjourney·
Drawing a triangle with python is as easy as it sounds.
PythonicJourney tweet media
English
0
0
1
26
PythonicJourney
PythonicJourney@pythonicjourney·
Performing prime factorization with python.
PythonicJourney tweet media
English
0
0
1
26
PythonicJourney
PythonicJourney@pythonicjourney·
@Python_Dv The sorted() function in Python returns a new sorted list from the elements of any iterable object, including tuples. Even though the input a is a tuple, the sorted() function transforms it into a list. When you assign the sorted result to variable sorted_num, it becomes a list.
English
0
0
1
3