TON is Hosting Three-Day Offline Marathons for Developers in 13 Cities Worldwide
TON (The Open Network), a blockchain integrated into Telegram, is currently holding the largest hackathon in its history, “The Open League Hackathon,” with a prize pool of $2,000,000!
To support the hackathon, TON Society is organizing offline events around the world, giving Web3 enthusiasts the opportunity to spend three days immersed in development and networking.
📍 The marathons will take place in Prague, Berlin, Kyiv, Warsaw, Tbilisi, Belgrade, Seoul, Taipei (Taiwan), Gurugram (India), Hong Kong, Minsk, Moscow, and Saint Petersburg. The first events start on May 24th, so hurry up and register!
🔥 Why you should participate:
— 3 days of networking, lectures, competitions, and working on your own projects with continuous support from TON Foundation representatives and teams from the TON ecosystem. You can also join online.
— $5,000 prize for the top three projects at each offline event + plenty of merchandise and other bonuses.
Don’t miss the chance to present your mini-application to 900 million active Telegram users with TON.
Check the marathon schedule and details here - sign up and don't miss out on this great opportunity!
For guaranteed application review and other inquiries, contact the community manager @kate_shuffle
TON (The Open Network), a blockchain integrated into Telegram, is currently holding the largest hackathon in its history, “The Open League Hackathon,” with a prize pool of $2,000,000!
To support the hackathon, TON Society is organizing offline events around the world, giving Web3 enthusiasts the opportunity to spend three days immersed in development and networking.
📍 The marathons will take place in Prague, Berlin, Kyiv, Warsaw, Tbilisi, Belgrade, Seoul, Taipei (Taiwan), Gurugram (India), Hong Kong, Minsk, Moscow, and Saint Petersburg. The first events start on May 24th, so hurry up and register!
🔥 Why you should participate:
— 3 days of networking, lectures, competitions, and working on your own projects with continuous support from TON Foundation representatives and teams from the TON ecosystem. You can also join online.
— $5,000 prize for the top three projects at each offline event + plenty of merchandise and other bonuses.
Don’t miss the chance to present your mini-application to 900 million active Telegram users with TON.
Check the marathon schedule and details here - sign up and don't miss out on this great opportunity!
For guaranteed application review and other inquiries, contact the community manager @kate_shuffle
TON
Your Digital Passport in TON Ecosystem
Build your reputation with every app you use and every contribution you make.
👍8❤2🥰1
Python Data Science Jobs & Interviews
❔ Question 50: #python
What is the purpose of the 'super' function in Python?
What is the purpose of the 'super' function in Python?
class Animal:
def init(self, name):
self.name = name
def speak(self):
return "Some sound"
class Dog(Animal):
def init(self, name, breed):
super().init(name)
self.breed = breed
def speak(self):
return f"{self.name} says Woof!"
class Cat(Animal):
def init(self, name, color):
super().init(name)
self.color = color
def speak(self):
return f"{self.name} says Meow!"
# Create objects from Dog and Cat classes dog = Dog('Buddy', 'Golden Retriever')
cat = Cat('Whiskers', 'Gray')
# Calling speak methods print(dog.speak()) # خروجی: Buddy says Woof!
print(cat.speak()) # خروجی: Whiskers says Meow!
https://t.iss.one/DataScienceQ
👍6
Python Data Science Jobs & Interviews
❔ Question 50: #python
What is the purpose of the 'super' function in Python?
What is the purpose of the 'super' function in Python?
❤️The super function in Python is used to call a method from the parent class inside a subclass.
❤️ This function gives access to the methods and properties of the parent class and allows you to use and extend the methods of the parent class in subclasses.
❤️It is very common in object-oriented programming to extend the capabilities of parent classes in subclasses.
https://t.iss.one/DataScienceQ
❤️ This function gives access to the methods and properties of the parent class and allows you to use and extend the methods of the parent class in subclasses.
❤️It is very common in object-oriented programming to extend the capabilities of parent classes in subclasses.
https://t.iss.one/DataScienceQ
👍4
❔ Question 53: #python
What is the purpose of the 'staticmethod' decorator in Python?
What is the purpose of the 'staticmethod' decorator in Python?
Anonymous Quiz
39%
It is used to define a method that can only be accessed by the class itself, not its instances.
19%
It is used to define a method that automatically receives the instance as its first argument.
30%
It is used to define a method that operates on the class itself rather than on instances.
13%
It is used to define a method that is automatically inherited by subclasses.
👍6❤3
Python Data Science Jobs & Interviews
❔ Question 53: #python
What is the purpose of the 'staticmethod' decorator in Python?
What is the purpose of the 'staticmethod' decorator in Python?
class MathOperations:
@staticmethod
def add(a, b):
return a + b
@staticmethod
def multiply(a, b):
return a * b
# Calling static methods without needing to create an instance of the class
result_add = MathOperations.add(5, 3)
result_multiply = MathOperations.multiply(4, 7)
print(f"Addition: {result_add}")
# Output: Addition: 8
print(f"Multiplication: {result_multiply}")
# Output: Multiplication: 28
https://t.iss.one/DataScienceQ
❤7👍1🥰1
Python Data Science Jobs & Interviews
class MathOperations: @staticmethod def add(a, b): return a + b @staticmethod def multiply(a, b): return a * b # Calling static methods without needing to create an instance of the class result_add = …
1⃣ A class MathOperations is defined with two methods, add and multiply, both defined using the @staticmethod decorator.
2⃣ These methods do not need to access any instance attributes or methods, so they can be defined as static methods.
3⃣ Static methods are called directly on the class without the need to create an instance of the class.
✅ Using staticmethod is useful when you need a function within a class that does not need to access any data from instances of that class and can operate independently.
https://t.iss.one/DataScienceQ
2⃣ These methods do not need to access any instance attributes or methods, so they can be defined as static methods.
3⃣ Static methods are called directly on the class without the need to create an instance of the class.
✅ Using staticmethod is useful when you need a function within a class that does not need to access any data from instances of that class and can operate independently.
https://t.iss.one/DataScienceQ
❤7
Python Data Science Jobs & Interviews
❔ Question 53: #python
What is the purpose of the 'staticmethod' decorator in Python?
What is the purpose of the 'staticmethod' decorator in Python?
❤️The staticmethod function in Python is used to define a method that operates on the class itself rather than on its instances.
❤️This type of method does not receive the instance as its first argument, unlike instance methods.
❤️These methods are typically used for utility functions related to the class that do not require access to instance attributes.
https://t.iss.one/DataScienceQ
❤️This type of method does not receive the instance as its first argument, unlike instance methods.
❤️These methods are typically used for utility functions related to the class that do not require access to instance attributes.
https://t.iss.one/DataScienceQ
❤17👍3
Python Data Science Jobs & Interviews
❤️The staticmethod function in Python is used to define a method that operates on the class itself rather than on its instances. ❤️This type of method does not receive the instance as its first argument, unlike instance methods. ❤️These methods are typically…
👆🏻👆🏻👆🏻👆🏻👆🏻👆🏻
❤10
❔ Question 54: #python
What is the purpose of the 'classmethod' decorator in Python?
What is the purpose of the 'classmethod' decorator in Python?
Anonymous Quiz
35%
to define a method that can only be accessed by the class itself, not its instances.
22%
to define a method that automatically receives the instance as its first argument.
31%
to define a method that operates on the class itself rather than on instances.
13%
to define a method that is automatically inherited by subclasses.
👍6
Python Data Science Jobs & Interviews
❔ Question 54: #python
What is the purpose of the 'classmethod' decorator in Python?
What is the purpose of the 'classmethod' decorator in Python?
💬 Answer as soon as possible so that we can publish more explanation and sample code in a few hours
Python Data Science Jobs & Interviews
❔ Question 54: #python
What is the purpose of the 'classmethod' decorator in Python?
What is the purpose of the 'classmethod' decorator in Python?
class Person:
population = 0
def init(self, name):
self.name = name
Person.population += 1
@classmethod
def from_birth_year(cls, name, birth_year):
age = 2024 - birth_year
instance = cls(name)
instance.age = age
return instance
@classmethod
def get_population(cls):
return cls.population
# Create objects using the default constructor
person1 = Person('Alice')
# Create an object using the alternative constructor
person2 = Person.from_birth_year('Bob', 1990)
# Display information
print(f"Name: {person1.name}")
print(f"Name: {person2.name}, Age: {person2.age}")
# Display population count
print(f"Population: {Person.get_population()}")
https://t.iss.one/DataScienceQ
👍2
Python Data Science Jobs & Interviews
class Person: population = 0 def init(self, name): self.name = name Person.population += 1 @classmethod def from_birth_year(cls, name, birth_year): age = 2024 - birth_year instance = cls(name) …
1⃣ A Person class is defined with an init method and a class variable population.
2⃣ The from_birth_year method is defined using the @classmethod decorator. This method is an alternative constructor that calculates the person's age based on their birth year and creates a new instance of the Person class.
3⃣ The get_population method is also defined using @classmethod, which returns the population count (the number of instances created from the Person class).
4⃣ Two instances of the Person class are created: one using the default constructor and the other using the alternative constructor from_birth_year.
5⃣ The information of the instances and the population count are printed.
✅ The classmethod function allows you to define methods that operate on the class itself and can access class variables and methods, rather than operating on individual instances.
https://t.iss.one/DataScienceQ
2⃣ The from_birth_year method is defined using the @classmethod decorator. This method is an alternative constructor that calculates the person's age based on their birth year and creates a new instance of the Person class.
3⃣ The get_population method is also defined using @classmethod, which returns the population count (the number of instances created from the Person class).
4⃣ Two instances of the Person class are created: one using the default constructor and the other using the alternative constructor from_birth_year.
5⃣ The information of the instances and the population count are printed.
✅ The classmethod function allows you to define methods that operate on the class itself and can access class variables and methods, rather than operating on individual instances.
https://t.iss.one/DataScienceQ
👍1
Python Data Science Jobs & Interviews
❔ Question 54: #python
What is the purpose of the 'classmethod' decorator in Python?
What is the purpose of the 'classmethod' decorator in Python?
❤️ The classmethod function in Python is used to define a method that operates on the class itself rather than on its instances.
❤️ This type of method automatically receives the class as its first argument, commonly named cls, instead of the instance.
❤️ This type of method is useful for defining alternative constructors, accessing class-level variables, or performing operations related to the class itself.
❤️ This type of method automatically receives the class as its first argument, commonly named cls, instead of the instance.
❤️ This type of method is useful for defining alternative constructors, accessing class-level variables, or performing operations related to the class itself.
❤1
Forwarded from Python Courses
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
Data science
You’ve been invited to add the folder “Data science”, which includes 17 chats.
❔ Question 55: #python
What is the purpose of the 'is' operator in Python?
What is the purpose of the 'is' operator in Python?
Anonymous Quiz
13%
It is used to perform bitwise AND operation between two integers.
17%
It is used to check if a given object is iterable.
40%
It is used to check if a given object belongs to a specific class or type.
30%
It is used to compare two objects to determine if they have the same identity.
❤6👍3🥰1
Python Data Science Jobs & Interviews
❔ Question 55: #python
What is the purpose of the 'is' operator in Python?
What is the purpose of the 'is' operator in Python?
# Define two identical lists
list1 = [1, 2, 3]
list2 = [1, 2, 3]
# Define another list that refers to the first list
list3 = list1
# Comparison using 'is'
print(list1 is list2) # Output: False
print(list1 is list3) # Output: True
# Comparison using '=='
print(list1 == list2) # Output: True
print(list1 == list3) # Output: True
https://t.iss.one/DataScienceQ
Telegram
Python Data Science Jobs & Interviews
Your go-to hub for Python and Data Science—featuring questions, answers, quizzes, and interview tips to sharpen your skills and boost your career in the data-driven world.
Admin: @Hussein_Sheikho
Admin: @Hussein_Sheikho
❤2👍1
Python Data Science Jobs & Interviews
# Define two identical lists list1 = [1, 2, 3] list2 = [1, 2, 3] # Define another list that refers to the first list list3 = list1 # Comparison using 'is' print(list1 is list2) # Output: False print(list1 is list3) # Output: True …
1⃣ Two lists, list1 and list2, are defined with identical values but refer to different memory locations.
2⃣ Another list, list3, is defined which refers to list1, so both refer to the same memory location.
3⃣ When list1 and list2 are compared using the is operator, the result is False because these two lists refer to different memory locations.
4⃣ When list1 and list3 are compared using the is operator, the result is True because both refer to the same memory location.
5⃣ Comparison using == for list1 and list2 results in True because the values inside the lists are identical.
✅ The is operator is used to check the identity of objects, while the == operator is used to check the equality of values.
https://t.iss.one/DataScienceQ
2⃣ Another list, list3, is defined which refers to list1, so both refer to the same memory location.
3⃣ When list1 and list2 are compared using the is operator, the result is False because these two lists refer to different memory locations.
4⃣ When list1 and list3 are compared using the is operator, the result is True because both refer to the same memory location.
5⃣ Comparison using == for list1 and list2 results in True because the values inside the lists are identical.
✅ The is operator is used to check the identity of objects, while the == operator is used to check the equality of values.
https://t.iss.one/DataScienceQ
Telegram
Python Data Science Jobs & Interviews
Your go-to hub for Python and Data Science—featuring questions, answers, quizzes, and interview tips to sharpen your skills and boost your career in the data-driven world.
Admin: @Hussein_Sheikho
Admin: @Hussein_Sheikho
❤2👍1
Python Data Science Jobs & Interviews
❔ Question 55: #python
What is the purpose of the 'is' operator in Python?
What is the purpose of the 'is' operator in Python?
❤️ The is operator in Python is used to compare two objects to determine if they have the same identity, i.e., if they refer to the same memory location.
❤️ This operator evaluates to True if the objects have the same identity and False otherwise.
https://t.iss.one/DataScienceQ
❤️ This operator evaluates to True if the objects have the same identity and False otherwise.
https://t.iss.one/DataScienceQ
Telegram
Python Data Science Jobs & Interviews
Your go-to hub for Python and Data Science—featuring questions, answers, quizzes, and interview tips to sharpen your skills and boost your career in the data-driven world.
Admin: @Hussein_Sheikho
Admin: @Hussein_Sheikho
❤5👍1