JU – Feh

Display an image without a border

feh --borderless /home/teresita/Downloads/48773.jpg &

Posted in Uncategorized | Leave a comment

K6 – Python

Plot the area under a curve with Python

#!/usr/bin/python3
from matplotlib import pyplot as plt
import numpy as np
x=np.arange(1,31)
y= x * x
plt.fill_between(x,y,color='blue', alpha=0.5)
plt.show()

Posted in Uncategorized | Leave a comment

K8 – Triangle

Calculate the area of any triangle


#!/usr/bin/python3
import sys,math
a=float(sys.argv[1])
b=float(sys.argv[2])
c=float(sys.argv[3])
peri=a+b+c
area=math.sqrt((a+b+c)*(a+b-c)*(a-b+c)*(-a+b+c))/4
print("Perimeter=",peri)
print("Area=",area)
Posted in Uncategorized | Leave a comment