PROJECT 2
WHATSAPP MESSAGES BOT
import pywhatkit
pywhatkit.sendwhatmsg("+91","MOBILE NO.","Hello", 16,40)
SPEEDTEST BY PYTHON
#pip i speedtest-cli
from speedtest import Speedtest
"""
Ping (ms): ping of the test connection, in miliseconds
d (Mb/s): d speed recorded, in megabits per second
Upload (Mb/s): upload speed recorded, in megabits per second
"""
print("Checking...")
st = Speedtest()
#For Checking Upload and d
dn = st.d()
up = st.upload()
print("Your d Speed====>",dn,"Kb/s")
print("Your Upload Speed=======>",up,"Kb/s")
#Now Convert Data into Megabits --
print("Your d Speed in Megabits====>",round(dn/10**6,2),"Mb/s")
print("Your Upload Speed in Megabits=======>",round(up/10**6,2),"Mb/s")
#Speed ====> 7Mb/s == 1MB/s
#Now Convert Data into MegaBytes---
print("Your d Speed in MegaBytes====>",(dn/10**6)/7,"MB/s")
print("Your Upload Speed in MegaBytes=======>",(up/10**6)/7,"MB/s")
#Also Calculate Ping---
# Get ping (miliseconds)
ping = st.results.ping
print("Ping in Milliseonds===>",ping,"/millisecond")
print("Ping in seonds===>",ping/10**3,"/second")
BMI
w = input("Enter Your Weight in KG.\n")
h = input("Enter Your height in Meter.\n")
#BMI = kg/m2
kilograms = float(w)
height = float(h)*float(h)
BMI = float(kilograms)/float(height)
print("your BMI is",BMI)
Comments
Post a Comment