Browse Source

ajout du projet

master
trystan 7 months ago
parent
commit
ddf7e4bc10
  1. 15
      IP_claculateur.py

15
IP_claculateur.py

@ -1,12 +1,13 @@
from tkinter import *
def adresse_reseau():
ip_address = IP_entree.get()
mask_mask = Mask_entree.get()
# Calculate the network address by performing an AND operation between the IP address and subnet mask
Adresse_reseau = '.'.join(str(int(ip_part) & int(mask_part)) for ip_part, mask_part in zip(ip_address.split('.'), mask_mask.split('.')))
# Display the network address
network_label.config(text='Network Address: ' + Adresse_reseau)
def adresse_reseau(IP,Mask):
IP = IP_entree.get()
Mask = Mask_entree.get()
Ip = IP.split
mask = Mask.split
s = '.'
Adresse_reseau = s.join(Ip & mask)
print(Adresse_reseau)
fenetre= Tk() #créé la fenetre principale

Loading…
Cancel
Save