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

Loading…
Cancel
Save