Test Internet Speed using Python program

import speedtest  

st = speedtest.Speedtest()

option = int(input('''What speed do you want to test in Megabits:  

1) Download Speed  

2) Upload Speed  

Your Choice: '''))

if option == 1:   

    print(st.download())    

elif option == 2:   

    print(st.upload())  

else:  

    print("Please enter the correct choice !")

Broadcasting in NumPy


 #Broadcasting
import numpy as np
# We will add,multiply, subtract  the vector v to each row of the matrix x,
x = np.array([[1,2,3], [4,5,6], [7,8,9]])
v = np.array([1, 0, 1])
print(x)
print(v)                 
y = x + v
y1= x * v
y2= x - v
print("Addition\n",y,"\n","Multiplication \n",y1,"\n","Subtraction \n",y2)