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)