Programming Classes


Channel's geo and language: not specified, not specified
Category: not specified


Tech For better Future!

Related channels  |  Similar channels

Channel's geo and language
not specified, not specified
Category
not specified
Statistics
Posts filter


For Web Development Class Students Only

Be informed that we will have Crucial Class Jan 7 at 10:00 PM (Local Time).

We will develop some projects on our today's lesson so try to watch below Videos .

https://youtu.be/cHv-ZYVm1Dg?si=CFNqaYmMxhtdKeDK

https://youtu.be/zqWOMO22CvE?si=YF8o1_KKUCPaWbAu

Please Share this Information For Your friends since this is a crucial class it will be hard to pass to other projects.


We are informed that most of the students have a tutorial class today. Therefore, our today's class is postponed. Enjoy your time and merry Christmas.

Please follow up for more video lesson and notes to be posted on this channel.


Forward from: Oro students
Students who want to study the following courses online please register at the link below.
🔰Cyber Security
Learn to safeguard systems and data from ever-evolving digital threats.

Upon completion of the above courses, you will receive a Certificate from Google. Only a few students left so Hurry up and register. Once you have registered, you will only be required to pay 200 ETB when you receive an email that your registration has been successful. Registration ends January 6th and Classes begin January 8th.
✅ To register 👇👇👇

https://docs.google.com/forms/d/e/1FAIpQLSetwkk6s-7zyZUC85UJPIUWnQjdV47aEDq-ULATLAmuRhFv2A/viewform?usp=sf_link


For Web development Students

✅Be informed that we don't have class today and follow this channel as we will have projects through this chat.






Python notes


n uppercase are:", uppercase)

# Example 5: Finding the length of each word in a sentence using list comprehension
sentence = "The quick brown fox jumps over the lazy dog"
lengths = [len(word) for word in sentence.split()]
print("The lengths of words are:", lengths)
`

Sure, here are five examples of if statements in Python:

1. Checking if a number is positive or negative:
num = -5
if num >= 0:
print("The number is positive")
else:
print("The number is negative")


2. Checking if a number is even or odd:
num = 7
if num % 2 == 0:
print("The number is even")
else:
print("The number is odd")


3. Checking if a string is empty or not:
string = ""
if len(string) == 0:
print("The string is empty")
else:
print("The string is not empty")


4. Checking if a number is divisible by both 3 and 5:
num = 15
if num % 3 == 0 and num % 5 == 0:
print("The number is divisible by both 3 and 5")
else:
print("The number is not divisible by both 3 and 5")


5. Checking if a person is eligible to vote based on their age:
age = 17
if age >= 18:
print("You are eligible to vote")
else:
print("You are not eligible to vote yet")


five examples for each type of loop in Python:

1\. For Loop:
# Example 1: Iterating over a string
for letter in "Python":
print(letter)

# Example 2: Iterating over a tuple
fruits = ("apple", "banana", "cherry")
for fruit in fruits:
print(fruit)

# Example 3: Iterating over a dictionary
person = {"name": "John", "age": 30, "country": "USA"}
for key, value in person.items():
print(key, value)

# Example 4: Iterating over a list of numbers and finding the sum
numbers = [1, 2, 3, 4, 5]
sum = 0
for num in numbers:
sum += num
print("The sum is:", sum)

# Example 5: Iterating over a list and printing the index and value of each element
fruits = ["apple", "banana", "cherry"]
for index, fruit in enumerate(fruits):
print(index, fruit)
2\. While Loop:
# Example 1: Printing numbers from 1 to 10 using while loop
num = 1
while num 0:
factorial *= num
num -= 1
print("The factorial is:", factorial)

# Example 3: Removing all occurrences of an element from a list using while loop
numbers = [1, 2, 3, 2, 4, 2, 5]
element = 2
while element in numbers:
numbers.remove(element)
print("The list after removing all occurrences of", element, "is:", numbers)

# Example 4: Printing numbers in reverse order using while loop
num = 10
while num >= 1:
print(num)
num -= 1

# Example 5: Finding the sum of digits of a number using while loop
num = 12345
sum = 0
while num > 0:
digit = num % 10
sum += digit
num //= 10
print("The sum of digits is:", sum)
3\. Nested Loops:
# Example 1: Printing multiplication table using nested loops
for i in range(1, 11):
for j in range(1, 11):
print(i, "*", j, "=", i*j)
print()

# Example 2: Finding all pairs of elements from two lists whose sum is even using nested loops
list1 = [1, 2, 3]
list2 = [4, 5, 6]
for x in list1:
for y in list2:
if (x+y) % 2 == 0:
print("(", x, ",", y, ")")

# Example 3: Printing a pattern using nested loops
for i in range(1, 6):
for j in range(1, i+1):
print("*", end="")
print()

# Example 4: Finding the common elements between two lists using nested loops
list1 = [1, 2, 3, 4]
list2 = [3, 4, 5, 6]
common = []
for x in list1:
for y in list2:
if x == y:
common.append(x)
print("The common elements are:", common)

# Example 5: Printing all possible combinations of a list using nested loops
list1 = [1, 2, 3]
for i in range(len(list1)):
for j in range(i+1, len(list1)):
print("(", list1[i], ",", list1[j], ")")
4\. Range Loop:
# Example 1: Printing even numbers using range loop
for num in range(0, 11, 2):
print(num)

# Example 2: Printing odd numbers using range loop
for num in range(1, 10, 2):
print(num)

# Example 3: Printing numbers in reverse order using range loop
for num in range(10, 0, -1):
print(num)

# Example 4: Finding the sum of numbers using range loop
numbers = [1, 2, 3, 4, 5]
sum = 0
for num in range(len(numbers)):
sum += numbers[num]
print("The sum is:", sum)

# Example 5: Printing the ASCII values of characters using range loop
for char in range(ord('a'), ord('z')+1):
print(chr(char), "=", char)
5\. List Comprehension:
`
# Example 1: Squaring numbers using list comprehension
numbers = [1, 2, 3, 4, 5]
squares = [num**2 for num in numbers]
print("The squares are:", squares)

# Example 2: Filtering even numbers using list comprehension
numbers = [1, 2, 3, 4, 5]
even = [num for num in numbers if num % 2 == 0]
print("The even numbers are:", even)

# Example 3: Removing duplicates from a list using list comprehension
numbers = [1, 2, 3, 2, 4, 2, 5]
unique = list(set([num for num in numbers]))
print("The list after removing duplicates is:", unique)

# Example 4: Converting a list of strings to uppercase using list comprehension
fruits = ["apple", "banana", "cherry"]
uppercase = [fruit.upper() for fruit in fruits]
print("The fruits i


#Basic_Computer


For basic computer students our class is in the afternoon 7:30 -9:00 local time. Don't miss it.


Today is a Crucial Lesson so Missing class today may cost you dearly.

2:00 (Local Time)


Hello, students
Due to some reasons our today's session is postponed for tomorrow.
We'll have a long session tomorrow starting from 2:00 - 6:00.
Make your self ready for the tomorrow's learning session.


Hello students

Due to different reasons we haven't learned for more than 3 weeks,
Please manage you're time as we might have multiple long learning sessions ahead to finish the course in this semester.


As the week comes to a close we couldn't resist sharing of these new photos of programming class at Ambo Ifa Boru Special Boarding School.


#WebDevlopment

Since We Are Lagging Behind In Our Lessons In Website Development, please practice the codes I sent you above on your phone in the format you learned before. In our next class we will be talking about lists and Tables. Let’s practice the preliminary codes we’ll be looking at together under this topic.


here are a few more basic HTML tags covering various text formatting and structural elements:

26. \ for indicating computer code:

int main() { return 0; }

27. \ for indicating keyboard input:

Press Ctrl + C to copy.

28. \ for highlighting text:

This text is highlighted.

29. \ for representing dates or times:

November 30, 2023

30. \ for indicating deleted text:

This text has been deleted.

31. \ for indicating inserted text:

This text has been inserted.

32. \ for smaller text:

This text is smaller.

33. \ for defining terms:

HTML stands for HyperText Markup Language.

34. \ for contact information:

123 Street, City, Country

These tags offer additional ways to format and structure text, highlight content, and provide context within an HTML document.


16. \ for bold text:

This text is bold.

17. \ for italicized text:

This text is italicized.

18. \ for underlined text:

This text is underlined.

19. \ for strikethrough text:

This text has a strikethrough.

20. \
for block quotes:

This is a blockquote.


21. \ for inline quotes:

This is an inline quote.

22. \ for abbreviations:

WWW

23. \ for citations:

Book Title

24. \ for subscript text:

H2O

25. \ for superscript text:

E=mc2

These tags allow for text formatting, quotations, abbreviations, citations, and special text positioning within HTML content.


1. append() method adds an element to the end of the list:

numbers = [1, 2, 3]
numbers.append(4)
print(numbers) # Output: [1, 2, 3, 4]
2. extend() method adds multiple elements to the end of the list:

numbers = [1, 2, 3]
numbers.extend([4, 5])
print(numbers) # Output: [1, 2, 3, 4, 5]
3. insert() method inserts an element at a specific index:

fruits = ["apple", "banana", "orange"]
fruits.insert(1, "grape")
print(fruits) # Output: ["apple", "grape", "banana", "orange"]
4. remove() method removes the first occurrence of an element:

fruits = ["apple", "banana", "orange"]
fruits.remove("banana")
print(fruits) # Output: ["apple", "orange"]
5. pop() method removes and returns the last element of the list:

numbers = [1, 2, 3]
last_number = numbers.pop()
print(last_number) # Output: 3
print(numbers) # Output: [1, 2]
6. index() method returns the index of the first occurrence of an element:

fruits = ["apple", "banana", "orange"]
index_of_banana = fruits.index("banana")
print(index_of_banana) # Output: 1
7. count() method returns the number of occurrences of an element in the list:

numbers = [1, 2, 3, 2, 1]
number_of_ones = numbers.count(1)
print(number_of_ones) # Output: 2
8. sort() method sorts the list in ascending order:

numbers = [3, 1, 4, 2]
numbers.sort()
print(numbers) # Output: [1, 2, 3, 4]
9. reverse() method reverses the order of the list:

numbers = [1, 2, 3]
numbers.reverse()
print(numbers) # Output: [3, 2, 1]
#python
@oroscholarly
Oroscholarly.gaammeemedia.com


Forward from: 🐹 Hamster Kombat Mini Game
Write the output of the following functions.
A function to add two numbers:

def add_numbers(a, b):
return a + b

result = add_numbers(5, 3)
print(result)
2. A function to check if a number is even:

def is_even(num):
if num % 2 == 0:
return True
else:
return False

print(is_even(4))
print(is_even(5))
3. A function to calculate the area of a circle:

import math

def area_of_circle(radius):
return math.pi * radius ** 2

print(area_of_circle(5))
4. A function to print a greeting message:

def greet(name):
print("Hello, " + name + "!")

greet("Alice")
greet("Bob")
5. A function to calculate the factorial of a number:
def factorial(num):
if num == 0:
return 1
else:
return num * factorial(num-1)

print(factorial(5))
@oroscholarly
Website: oroscholarly.gaammeemedia.com


Tomorrow, we will have classes just like scheduled in the timetable. So students do prepare and come to class on time.
Have a nice time.

20 last posts shown.

176

subscribers
Channel statistics