From 0ed2728457cf4421fad777a604229a5d9ec53786 Mon Sep 17 00:00:00 2001 From: TimoshenkoAA Date: Sun, 28 Sep 2025 11:06:34 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'TEMA3/report3.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TEMA3/report3.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/TEMA3/report3.md b/TEMA3/report3.md index ca87233..a3cd647 100644 --- a/TEMA3/report3.md +++ b/TEMA3/report3.md @@ -51,20 +51,6 @@ ValueError: invalid literal for int() with base 10: '98.76' ``` В последней иструкции видим ошибку. Это происходит из-за того, что int() не может перевести строку в целочисленный тип, если указана дробная часть. -Еще варианты: -``` ->>> tt6=int("+43") ->>> tt6 -43 ->>> tt6=int("aaa") -Traceback (most recent call last): - File "", line 1, in - tt6=int("aaa") -ValueError: invalid literal for int() with base 10: 'aaa' ->>> tt6=int("aaa", 16) ->>> tt6 -2730 -``` Преобразование в вещественное число: ``` >>> flt1 = float(789)