corrections du cours après la présentation

This commit is contained in:
gwen
2017-06-21 10:52:29 +02:00
committed by Benjamin Bohard
parent 08495c6a07
commit b98c46b4ae
3 changed files with 35 additions and 10 deletions

View File

@ -428,7 +428,7 @@ Traduction d'une structure de données dans une autre
'low': '192.168.0.8',
'only_unknown': False}],
'mask': '255.255.255.0'},
{'address': '192.168.0.1',
{'address': '192.168.10.0',
'dynamicRanges': [{'high': '192.168.0.12',
'low': '192.168.0.5',
'only_unknown': True},

View File

@ -433,6 +433,17 @@ Le prompt OCaml (utop)::
val y : int = 3
# y * y;;
- : int = 9
Construire une boucle d'interaction avec l'utilisateur en python::
#!/usr/bin/env python3
error = True
while error:
try:
entier = int(input('donnez un entier : '))
error = False
except:
print('une valeur entiere est attendue')
print(entier)
Lire et écrire dans un fichier
------------------------------