Automatic ping check program
Naming

The elephant in the room: names like var1 and var2 really hinder the readibility. var1 probably means has_packet_loss, var2 -> latency. Naming is hard, but it also is a fundamental property of readable code.

Ternary

You got repetition in

if var1 == 0: # has_packet_loss
    Status.configure(background="Green")
else:
    Status.configure(background="Red")


Becomes:

  status_color = "Red" if has_packet_loss else "Green"
  Status.configure(background=status_color)


Comments

You are commenting weird things: # Start &amp; End Button is a thing I clearly see from the code, but the general purpose of the script is not immediately obvious. I suggest avoiding line-by-line comments and instead go for a docstring explaining the general purpose.

Logic extraction

StatusPing.configure is repeated 3 times:

if var2 &lt;= 35:
    StatusPing.configure(background="Green")
if 35 &lt; var2 &lt; 70:
    StatusPing.configure(background="Yellow")
if var2 &gt;= 70:
    StatusPing.configure(background="Red")


Write a function to determine background color and use it to avoid this repetition (Or a list of tuples)

Named constants

Define parameters at the start and use them later, this makes the code easier to re-use and makes it funnier to tinker (pun intended) with it. For example the ID to ping, the size of the widget, the colours, the messages...