+ 2
x =int(input()) y =int(input()) print(x+y)
Why can't python take two inputs
11 Réponses
+ 6
Yes, python can. On Sololearn Playground works it only in this way:
2
3
+ 5
Chiemerie Ekwueme E. ,
your answer is confusing me. what do you mean by: "one of them has to be a float" ???
+ 3
You need to input both number at once, separated by a line break. Read what the text in the pop-up says.
+ 3
It does NOT mean "using eval() function", floats are not required to solve the task.
float() and eval() are misleading if someone tries to solve the task or tries to get multiple inputs.
+ 2
Okay
+ 2
and so:
a, b=int(input()),int(input())
def sum(a, b):
return a + b
print(sum(a, b))
If use in the function
+ 2
Hii sir msg me
+ 1
Thanks
+ 1
It means using EVAL() function
+ 1
Yes
- 1
One of them has to be a float