ru
Feedback

Не попадитесь на канал ботавода! Telemetrio находит и помечает такие каналы 👉 Хотите видеть метку — оформите подписку

Leetcode with dani

Leetcode with dani

Открыть в Telegram

Join us and let's tackle leet code questions together: improve your problem-solving skills Preparing for coding interviews learning new algorithms and data structures connect with other coding enthusiasts

Больше
1 240
Подписчики
-124 часа
-37 дней
-1730 дней
Архив постов
[Python Learning YouTube Playlist by former student] Abel Gideon was one of our the former Pre-Engineering students who is currently studying Biomedical Engineering. Now, he communicated our office that he created a YouTube playlist focused on learning Python for beginners. Even if the level may not fit to you all, we beleve that this may assist many of our Pre-Engineering students who are taking the course "Computer Programming". If you need to check it, please click the link below, send him your your feedbacks, and encourage him to do more. https://youtube.com/playlist?list=PLf1VjpIMOtxSi7m60Zf2q-vEvBdC0qI-D&si=yR6pGmo6opCStSiM The PECC Office (@peccaait)
27 авг. 2023, 06:00

give me two code challenge in python with answer
22 авг. 2023, 14:56
22 авг. 2023, ~14:56

To create your own module in Python, you can follow these steps: 1. Create a new Python file with the desired functions, classes, or variables. Let's say you want to create a module called my_module with a function greet() that prints a greeting message.       # my_module.py    def greet(name):        print(f"Hello, {name}!")    2. Save the file with a .py extension. In this case, save it as my_module.py. 3. Now, you can import and use the greet() function from the my_module module in another Python program.       # main.py    import my_module    my_module.greet("Alice")       When you run the main.py program, it will import the my_module module and call the greet() function, which will print the greeting message "Hello, Alice!". Note: Make sure that the module file (my_module.py in this example) is in the same directory as the program that imports it. If the module file is in a different directory, you may need to specify the path or add the directory to the Python module search path. By following these steps, you can create your own module in Python and use it in other programs to organize and reuse your code.
22 авг. 2023, 14:26

Python_Module_Python_programming_for_beginner_in_Amharic_part_170.mp428.24 MB
22 авг. 2023, 10:00

In amharic
22 авг. 2023, 10:00

Python_Modules_Python_Modules_Tutorial_What_Are_Python_Modules_Intellipaat360p.mp449.11 MB
22 авг. 2023, 09:58

In Python, a module is like a special file that contains helpful code that we can use in our programs. It's like having a toolbox full of useful tools that we can use whenever we need them. To create a module, we just need to make a new file with a .py ending. Inside this file, we can write functions, classes, or variables that we want to use in other programs. To use a module in our program, we can import it using the import statement. This is like opening up our toolbox and taking out the tools we need. For example, let's say we have a module called "math_operations.py" that has functions for doing math calculations. We can import this module in our program like this: import math_operations result = math_operations.add(5, 10) print(result) In this example, we imported the "math_operations" module and used its "add" function to add 5 and 10 together. The result is then printed out. Modules are important because they help us keep our code organized and allow us to reuse code that we've written before. They make it easier for us to manage and maintain our programs. Python also has many built-in modules that come with the language. These modules provide extra functionality, like doing math or working with dates and times. They're like extra tools that we can use whenever we need them.
22 авг. 2023, 09:50

What is module?
22 авг. 2023, 09:50

because of the next question I'll explain both the while loop and the for loop in Python with examples. 1. While Loop: A while loop repeatedly executes a block of code as long as a specified condition is true. It continues to execute the code until the condition becomes false. The general syntax of a while loop is as follows: while condition:     # code to be executed Example: count = 0 while count < 5:     print("Count:", count)     count += 1 In this example, the while loop will execute the code block as long as the condition count < 5 is true. It will print the value of count and increment it by 1 in each iteration. The loop will stop when count becomes 5. Output: Count: 0 Count: 1 Count: 2 Count: 3 Count: 4 2. For Loop: A for loop is used to iterate over a sequence (such as a list, tuple, string, or range) or any other iterable object. It executes a block of code for each item in the sequence. The general syntax of a for loop is as follows: for item in sequence:     # code to be executed Example 1: fruits = ["apple", "banana", "cherry"] for fruit in fruits:     print(fruit) In this example, the for loop iterates over each item in the fruits list. It assigns each item to the variable fruit and then executes the code block, which simply prints the value of fruit. Output: apple banana cherry Example 2: for i in range(5):     print(i) In this example, the for loop uses the range() function to generate a sequence of numbers from 0 to 4. It assigns each number to the variable i and then executes the code block, which prints the value of i. Output: 0 1 2 3 4 Both while loops and for loops are powerful tools for automating repetitive tasks and iterating over sequences. The choice between them depends on the specific requirements of your program.
22 авг. 2023, 04:15

Here's an explanation of tuples, dictionaries, and sets in Python: 1. Tuples: A tuple is an ordered, immutable collection of elements enclosed in parentheses (). Tuples are similar to lists, but the main difference is that tuples cannot be modified once created. They are commonly used to store related pieces of data together. Example: my_tuple = (1, 2, 3, "hello", True) 2. Dictionaries: A dictionary is an unordered collection of key-value pairs enclosed in curly braces {}. Each key-value pair is separated by a colon (:), and the keys must be unique. Dictionaries are useful for storing and retrieving data based on a specific key. Example: my_dict = {"name": "John", "age": 25, "city": "New York"} 3. Sets: A set is an unordered collection of unique elements enclosed in curly braces {}. Sets are useful when you want to store a collection of items without any duplicates. They also support mathematical set operations like union, intersection, and difference. Example: my_set = {1, 2, 3, 4, 5} In addition to the basic operations, Python provides various built-in functions and methods to manipulate and work with tuples, dictionaries, and sets. It's important to note that dictionaries and sets are mutable, meaning you can modify their contents after creation, while tuples are immutable and cannot be changed once created. I hope this explanation helps! Let me know if you have any further questions.
22 авг. 2023, 01:06

which concept is not clear for you until know
19 авг. 2023, 08:47

for answering all of the question you can leave a comment and share the channel for your friends
12 авг. 2023, 03:48

# code challenge Create a program that calculates the factorial of a given number using a for loop
12 авг. 2023, 01:57

#code_challenge Write a program that generates a random number between 1 and 100 and allows the user to guess the number. The program should provide hints (higher or lower) until the user guesses correctly.
10 авг. 2023, 15:29

#code_challenge write a code that checks if a given input is a palindrome or not. A palindrome is a word, phrase, number, or sequence of characters that reads the same forwards and backwards. For example, words like "level," "radar," and "madam" are palindromes because they are spelled the same way in reverse.
09 авг. 2023, 14:21

#code_challenge Write a program that checks if a given number is even or odd.
09 авг. 2023, 04:34

#code_challenge 1. Make a list of five or more usernames, including the name 'admin'. Imagine you are writing code that will print a greeting to each user after they log in to a website. Loop through the list, and print a greeting to each user: If the username is 'admin', print a special greeting, such as Hello admin, would you like to see a status report? Otherwise, print a generic greeting, such as Hello john, thank you for logging in again. .
06 авг. 2023, 01:49

4. What will be the output of the following code? x = 5 y = 5 print(x != y)
Anonymous voting
05 авг. 2023, 04:33

3. What will be the output of the following code? numbers = [3, 1, 5, 2, 4] numbers.sort(reverse=True) print(numbers)
Anonymous voting
05 авг. 2023, 04:30

we can sort the list temporarily numbers = [3, 1, 5, 2, 4] print(sorted(numbers)) #output => [1,2,3,4,5] print(numbers) #output=>[3, 1, 5, 2, 4]
05 авг. 2023, 04:12