Hilo این در واقع یک مثاله من میخوام استثناعات رو مدیریت کنم 7 mensajes · 11:21 –11:36 C این در واقع یک مثاله من میخوام استثناعات رو مدیریت کنم
میخوام اگه اروری قراره چاپ بشه من متن خودمو جایگزین کنم
کسی ایده ای نداره؟
11:21 M با exception ها انجام بده
11:33 C M try:
num1 = 7
num2 = 0
print (num1 / num2)
print("Done calculation")
except ZeroDivisionError:
print("An error occurred")
print("due to zero division")
ی چیز شبیه این
11:35 M try:
print("Hello")
print(1 / 0)
except ZeroDivisionError:
print("Divided by zero")
finally:
print("This code will run no matter what")
و شبیه این
11:36 S ساختار مدیریت اکسپشن ها:
try:
Code
except ValueError as e:
Your msg here
except Exception as e:
Your msg here
...
11:35 M Mostrar en el feed Copiar enlace Original en Telegram
Un feed público abierto del índice de búsqueda
ChatCrawler — el “Google del Telegram público”; se actualiza a medida que se rastrea la comunidad.
Las horas se muestran en UTC.
Solo contenido público, API oficial de Telegram.
Acerca de ·
Preguntas frecuentes ·
Límites del índice ·
Eliminar una página ·
Catálogo ·
Búsqueda ·
Cómo contamos