Dagmawi Babi
6.64K subscribers
15.3K photos
2.07K videos
236 files
2.16K links
Believer of Christ | Creative Developer.

Files Channel: https://t.me/+OZ9Ul_rSBAQ0MjNk

Community: @DagmawiBabiChat
Download Telegram
Quick Sort in Python
def sort(array):
#Sort the array by using quicksort

less = []
equal = []
greater = []

if len(array) > 1:
pivot = array[0]
for x in array:
if x < pivot:
less.append(x)
elif x == pivot:
equal.append(x)
elif x > pivot:
greater.append(x)
return sort(less)+equal+sort(greater)
else:
return array

#Telegram #Code #QuickSort #Python
@Dagmawi_Babi
Python program to display the Fibonacci sequence


# Recursive Fibonacci

def recur_fibo(n):
if n <= 1:
return n
else:
return(recur_fibo(n-1) + recur_fibo(n-2))

nterms = 10

# check if the number of terms is valid
if nterms <= 0:
print("Plese enter a positive integer")
else:
print("Fibonacci sequence:")
for i in range(nterms):
print(recur_fibo(i))

#Telegram #Code #Fibonacci #Python
@Dagmawi_Babi
Anyways Fast HTML was released last night.
FastHT.ML

If you're a pythonista this should make you happy cause now you can build modern web applications in pure Python and deploy basically anywhere.

Here's a tutorial
youtu.be/Auqrm7WFc0I?si=xS-k-XfbXi3w_njT

Or docs
docs.fastht.ml

What's impressive is that FastHTML itself is just 1k lines of code and compliments the design philosophy of FastAPI.

#FastHTML #Python
@Dagmawi_Babi