T
T
theproyt20172018-01-28 17:51:03
Python
theproyt2017, 2018-01-28 17:51:03

What's wrong with python?

Writes: Typeerror: 'input' is an invalid keyword argument for this function
I write:
num = (int (input = "How old are you?"))
if num < 18:
TAB print ("You're still young!")
if num > 18:
TAB print ("You're already old!")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max Payne, 2018-01-28
@theproyt2017

num = int(input("Сколько вам лет?"))
input is a function, you don't need to equate it to anything, and even inside a type conversion, and even inside a variable assignment.
You were hinted about this in a comment to the question, but you did not understand the catch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question