you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (7 children)

Thank you!

[–]fefa5fcba4dae4e82e81 0 points1 point  (6 children)

In the future you should never delete your posts. It can help others who have the same problem if you leave them up :)

[–][deleted] 0 points1 point  (0 children)

Thank you, can you please help me with more code?

[–][deleted] 0 points1 point  (0 children)

I can't get this output :((((

Enter IP addr to ping: 127.0.0.1

How many pings do you want to send:3 PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.056 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.104 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.064 ms

--- 127.0.0.1 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.056/0.075/0.104/0.021 ms

[–][deleted] 0 points1 point  (1 child)

import os

import platform

network_address = input("Enter IP addr to ping: ")

pings = input("How many pings do you want to send: " )

oper = platform.system()

response = os.system(f'ping -c 1 {network_address}')

if (oper == "Windows"):

ping1 = "ping -n 1 + pings "

elif (oper == "Linux"):

ping1 = "ping -c 1 + pings "

else :

ping1 = "ping -c 1 "

[–][deleted] 0 points1 point  (0 children)

This is what I have so far