+ 1

I unable to run it in sololearn..what I'm doing wrong?

https://code.sololearn.com/cPfNrmC25LPO/?ref=app

8th Jun 2019, 3:15 PM
Subhashis Singh
Subhashis Singh - avatar
7 Answers
+ 4
You created a function, but never called it. Add this to the bottom of your code: my_fun()
8th Jun 2019, 3:21 PM
Jax
Jax - avatar
+ 3
No problem bro
8th Jun 2019, 3:24 PM
Jax
Jax - avatar
+ 3
adding \n (only inside a string) will create a new line. This removes the need to create an entire print() function
8th Jun 2019, 5:42 PM
Jax
Jax - avatar
+ 1
Ohh thank you..😊
8th Jun 2019, 3:23 PM
Subhashis Singh
Subhashis Singh - avatar
+ 1
It's all in one line because of how SoloLearn treats inputs and their prompts. Using another IDE solves this problem but if you want it to work in SoloLearn try the following. def my_fun(): x = input('Type 1st name: ') print() y = input('Type 2nd name: ') print() z = x + " " + y print(z) my_fun()
8th Jun 2019, 4:30 PM
Diego
Diego - avatar
+ 1
Thanks both of you...
8th Jun 2019, 6:04 PM
Subhashis Singh
Subhashis Singh - avatar
0
Why all output is in one line..it looks bad.....is there any way I can change it.
8th Jun 2019, 3:27 PM
Subhashis Singh
Subhashis Singh - avatar