Code With Python
39K subscribers
841 photos
24 videos
22 files
746 links
This channel delivers clear, practical content for developers, covering Python, Django, Data Structures, Algorithms, and DSA – perfect for learning, coding, and mastering key programming skills.
Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
📚 Applied Math for Security (2023)

1⃣ Join Channel Download:
https://t.me/+MhmkscCzIYQ2MmM8

2⃣ Download Book: https://t.me/c/1854405158/302

💬 Tags: #math #cyberSecurity

USEFUL CHANNELS FOR YOU
👍4💯2
#Python #Top60 #BuiltInFunctions

#1. print()
Prints the specified message to the screen.

print("Hello, World!")

Hello, World!


#2. len()
Returns the number of items in an object.

my_list = [1, 2, 3, 4]
print(len(my_list))

4


#3. type()
Returns the type of an object.

name = "Python"
print(type(name))

<class 'str'>


#4. input()
Allows user input.

username = input("Enter your name: ")
print("Hello, " + username)

Enter your name: Alex
Hello, Alex


#5. int()
Converts a value to an integer number.

string_number = "101"
number = int(string_number)
print(number + 9)

110

---
#Python #DataTypes #Conversion

#6. str()
Converts a value to a string.

age = 25
print("My age is " + str(age))

My age is 25


#7. float()
Converts a value to a floating-point number.

integer_value = 5
print(float(integer_value))

5.0


#8. bool()
Converts a value to a Boolean (True or False).

print(bool(1))
print(bool(0))
print(bool("Hello"))
print(bool(""))

True
False
True
False


#9. list()
Converts an iterable (like a tuple or string) to a list.

my_tuple = (1, 2, 3)
my_list = list(my_tuple)
print(my_list)

[1, 2, 3]


#10. tuple()
Converts an iterable to a tuple.

my_list = [4, 5, 6]
my_tuple = tuple(my_list)
print(my_tuple)

(4, 5, 6)

---
#Python #Math #Functions

#11. sum()
Returns the sum of all items in an iterable.

numbers = [10, 20, 30]
print(sum(numbers))

60


#12. max()
Returns the largest item in an iterable.

numbers = [5, 29, 12, 99]
print(max(numbers))

99


#13. min()
Returns the smallest item in an iterable.

numbers = [5, 29, 12, 99]
print(min(numbers))

5


#14. abs()
Returns the absolute (positive) value of a number.

negative_number = -15
print(abs(negative_number))

15


#15. round()
Rounds a number to a specified number of decimals.

pi = 3.14159
print(round(pi, 2))

3.14

---
#Python #Iterables #Functions

#16. range()
Returns a sequence of numbers, starting from 0 by default, and increments by 1.

for i in range(5):
print(i)

0
1
2
3
4


#17. sorted()
Returns a new sorted list from the items in an iterable.

unsorted_list = [3, 1, 4, 1, 5, 9]
sorted_list = sorted(unsorted_list)
print(sorted_list)

[1, 1, 3, 4, 5, 9]


#18. enumerate()
Returns an enumerate object, which contains pairs of index and value.

fruits = ['apple', 'banana', 'cherry']
for index, fruit in enumerate(fruits):
print(index, fruit)

0 apple
1 banana
2 cherry


#19. zip()
Returns an iterator that aggregates elements from two or more iterables.

names = ['Alice', 'Bob', 'Charlie']
ages = [25, 30, 35]
for name, age in zip(names, ages):
print(f"{name} is {age} years old.")

Alice is 25 years old.
Bob is 30 years old.
Charlie is 35 years old.


#20. map()
Applies a given function to each item of an iterable and returns a map object.
1