Найти - Пользователи
Полная версия: TypeError: can't multiply sequence by non-int of type 'float'
Начало » Python для новичков » TypeError: can't multiply sequence by non-int of type 'float'
1
stasgrgrv
Ошибка
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int of type ‘float’

Если на команду инпут вводить нецелое число.
Используется b = int(input())
в чем дело?
Stepan_M
Возможно, дело в том, что int - тип целых чисел.
Попробуйте
 b = float(input())
Shaman
>>> [] * 1.0

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
[] * 1.0
TypeError: can't multiply sequence by non-int of type 'float'
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB