Python code | Sololearn: Learn to code for FREE!

0

Python code

Why this code does not run in Python? https://code.sololearn.com/cLVBt5Ek70l9/?ref=app

py

1/27/2022 9:51:31 AM

Amir L

9 Answers

New Answer

+3

Your program requires two inputs So you should enter the two inputs in separate lines Like John Smith Output will be Hello John Smith

+2

Muhammad Right, thank you 🤍

+1

Run this code to understand how SoloLearn handles inputs https://code.sololearn.com/WhiNb9BkJUVC/?ref=app

+1

You're welcome bro 😊Amir L

+1

I got easier solution , instead of using two input function , assign only one input and add .split() to it and and store in two different variables 👍🏼

0

In Sololearn you have to specify input once before the start of the program. That is way your program gives a weird output.

0

ravilnicki I know. But in SoloLearn you can not get two inputs! I enter the first input but I have no way for the second input.

0

Like Muhammad said. When you have more than one line of input you have to specify it on a seperate lines.

0

Amir L To get several inputs ​​you need to write them from a new line.