Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Python/Speedtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#install the required package
!pip install speedtest-cli
import speedtest

speed_test = speedtest.Speedtest()

def bytes_to_mb(bytes):
KB = 1024 #One kilobyte is 1024 bytes
MB = KB * 1024 # One MB is 1024KB
return int(bytes/MB)

download_speed = bytes_to_mb(speed_test.download())
print ("Your Download speed is ", download_speed, "MB" )