0
here in this we get 3 outputs.. First is "enter a no7" and third is only "7". but we have used the same print(x) command in both cases?
http://www.sololearn.com/app/JUMP_LINK__&&__python__&&__JUMP_LINK/playground/c2ZbRZVsSbY1/
5 odpowiedzi
0
So close... If you had just put that link in the description instead of the title, I would be able to copy pasta it.
0
done as u said..
0
Excellent
Then I arrive at a problem. I was hoping to find an error in your code to help you fix it since I did not understand your question, however there was nothing wrong. What is your question exactly?
0
it looks a bit different if you run it on the computer. here is the image http://imgur.com/fMirq1u . outputs marked with blue and orange are your prints. in case of playground, user's 7 is not printed (not sure why) so the output of your first print sticks to input statement's string.
0
Oh I see.
Since you typed in 7 in the console, it stayed there. However in the code playground, the input is done on a pop-up screen and not the console. The problem with the playground is instead of displaying the input prompt in the pop-up box, it displays it on the console. Since the prompt does not have the newline symbol, the first output gets printed right next to the input prompt text. So when using input on code playground, make sure to add \n in your prompt string so other that the output prints on the next line.
e.g.
s = input ('enter something \n')
print (s)