0
Solo learn python app for android code playground isnt matching examples in basic topic: input??
playground example has pop up with different text than whats in parentheses. playground parentheses says input ("enter number") popup "it looks like you need to enter a value" In the type conversion section next the example output is 42 when the input is something like float("input("enter number:")) code playground output for that same input is: "enter number: 42" pls help? code the playground writes print(float(input("Enter a number: ")) + float(input("Enter another number: "))) *more in comments*
7 ответов
0
post the code
0
in the playground the code is
print(float(input("Enter a number: ")) + float(input("Enter another number: ")))
this is the one that gives a popup of "it looks like your code requires 2 entries" or something like that. When you enter w numbers your output says
Enter a number: Enter another number: #
(# is some sum of two numbers you've inputted)
My q is why are the words printed with the sum and not just the numerical sum only?
0
if i remove the word print (because in the lesson the word print isnt there) the output is not just the number like in the lesson.
when the word print is removed the output are the words
"Enter a number: Enter another number:"
I want the playground example to match the lesson example. I dont know which behavior to expect and why
0
the problem is in sololearn input is not taken in runtime rather taken at the very beginning.
the reason for the output your seeing is because of the "input" it prints message inside during runtime so it looks like fault.
0
what is it supposed to be? if I run this command in the real world I need to know what to expect
0
first it will print text inside "input() " then it will wait for the input then prints the output
0
my question is what is the final output supposed to be? just the number?