+ 1

Привет друзья проблемы с кодом (TypeError 'int'

Хотел сделать простой код по вычислению но не справился x = str(input('Куда идёт змея?')) y = (input('сколько секунд?')) d = y * 3 print(d)

10th Oct 2021, 3:28 PM
Real Estate Agency Phoenix
Real Estate Agency Phoenix - avatar
5 ответов
+ 2
Please always tag the programming language you're asking about. Assuming that this is python you can do this: y = int(input()) In Python input is always string type. If you want a different type you have to convert it. Use float() instead of int() if you want to use decimals.
10th Oct 2021, 3:45 PM
Simon Sauter
Simon Sauter - avatar
+ 1
I don't see a mistake. What was your input?
10th Oct 2021, 3:33 PM
Stefanoo
Stefanoo - avatar
+ 1
y = int(input ....
10th Oct 2021, 4:07 PM
Олег
Олег - avatar
+ 1
thanks for your help, very nice!
10th Oct 2021, 7:49 PM
Real Estate Agency Phoenix
Real Estate Agency Phoenix - avatar
+ 1
🤝
10th Oct 2021, 7:51 PM
Олег
Олег - avatar