Import Os # Ip And Ping Header Def Main(): Print(‘ip, Timetoping… Cheap Essay Help

import os
# IP and ping headerdef main(): print(‘IP, TimeToPing (ms)’)# able to read the pingfile.txt file=open(“pingfile.txt”, “r”) lines=file.readlines()# pings the address for line in lines: response=os.system(“ping -c 1 ” line) if (response == 0): status = line.rstrip() ” is Reachable”# prints out the status else: status = line ” NotFound” print(status)
if __name__ == “__main__”: main()
please fix the code to look like this (see bottom)
P, Time (ms)10.1.0.1, NotFoundnuremburg, 145etc.
i don’t need the “its reachable”. please replace with milliseconds instead.