0

How am I going to do to separate multiple lines in Python?

Like; Test case #1, #2, #3and so on

11th Jan 2022, 1:38 PM
Umar Lukman Ahmad
34 odpowiedzi
+ 9
use the backslash ( \ ) to indicate that a statement is continued on the next line
12th Jan 2022, 5:37 PM
Vaibhav
Vaibhav - avatar
+ 3
May you need your code to work for different values for x and y then just read about how to take inputs into variables.. x =int (input() ) # takes input and converted to int type. Same do for y. Then you can run several times and give different inputs.. Check the output.. Your expected output is not matching with your code, it is not understandable.. try it now.. then reply hope it helps..
11th Jan 2022, 2:21 PM
Jayakrishna 🇮🇳
+ 1
Show your attempt and expected output details.. That helps to understand problem..
11th Jan 2022, 2:02 PM
Jayakrishna 🇮🇳
+ 1
x=6 y=3 z=int(x + y) print(z) x=11 y=22 z=int(x + y) print(z)
11th Jan 2022, 2:09 PM
Umar Lukman Ahmad
+ 1
You should do like this print("""#1 \n #2 \n #3 \n""") #it should print in separate line's
11th Jan 2022, 3:24 PM
Steve Shijo
Steve Shijo - avatar
+ 1
Pls am new here pls i need help in coding because i believe that if i express my thought in these coding an answer will be giving to me
11th Jan 2022, 9:31 PM
Sydney Chinedu
+ 1
Umar Lukman Ahmad If you would like to keep on reading lines from the stdin until a null-string is encountered, use this: out = input() while k := input(): out += "\n" + k
13th Jan 2022, 1:49 AM
Œ ㅤ
Œ ㅤ - avatar
+ 1
There are several Python courses 👉LINK YOUR CODE!👈
15th Jan 2022, 2:43 PM
Lisa
Lisa - avatar
+ 1
If you have tried, then you have a code. Show it, so we can help you!
15th Jan 2022, 2:44 PM
Lisa
Lisa - avatar
+ 1
If we don't know what you tried, we can't help you. So try and show your attempt!
15th Jan 2022, 2:55 PM
Lisa
Lisa - avatar
+ 1
Just take your time and write code again and the show us we will better understand
15th Jan 2022, 3:00 PM
Hellock
+ 1
Share the code
15th Jan 2022, 3:21 PM
Hellock
0
Can you please show your code? In general you can use \n for linebreaks
11th Jan 2022, 1:41 PM
Lisa
Lisa - avatar
0
Ok thanks
11th Jan 2022, 1:41 PM
Umar Lukman Ahmad
0
I tried but not work
11th Jan 2022, 1:56 PM
Umar Lukman Ahmad
0
Read my initial comment again: Show your code!
11th Jan 2022, 2:03 PM
Lisa
Lisa - avatar
0
I screenshot shot the problem may I share it with you?
11th Jan 2022, 2:04 PM
Umar Lukman Ahmad
0
We only need the *code*
11th Jan 2022, 2:05 PM
Lisa
Lisa - avatar
0
And expected output should in form of case; 1,2,3 to 5
11th Jan 2022, 2:12 PM
Umar Lukman Ahmad
0
Ok thanks
11th Jan 2022, 2:28 PM
Umar Lukman Ahmad