Code coach More Line, More Better. Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code coach More Line, More Better. Python

I'm trying the code coach More line, More better which asks this: Working with strings is an essential programming skill. Task: The given code outputs A B C D (each letter is separated by a space). Modify the code to output each letter on a separate line, resulting in the following output: A B C D Which I anwser this to: print('A \nB \nC \nD') But it tells me it's wrong does anyone know why?

30th Apr 2021, 2:45 PM
TheBreakingPanda
TheBreakingPanda - avatar
11 Answers
+ 5
print('A\nB\nC\nD\n')
30th Jan 2022, 7:54 PM
Avrian Shandy
Avrian Shandy - avatar
+ 1
TheBreakingPanda There should not be space after A, B, C
30th Apr 2021, 3:04 PM
A͢J
A͢J - avatar
+ 1
you code should be like this print('A\nB\nC\nD') without spaces between them
2nd Nov 2021, 4:16 PM
Diego Bautista F.
Diego Bautista F. - avatar
0
your answer is correct, don't know what's happened!?
30th Apr 2021, 8:44 PM
iTech
iTech - avatar
0
print('A\nB\nC\nD\n') This is the correct answere for this particular question
27th Jul 2021, 11:55 AM
Prarthana patel
Prarthana patel - avatar
0
print("A\nB\nC\nD") this is the answer, there should be no white space
25th Jan 2022, 3:21 PM
Stephen
0
print('A\nB\nC\nD\n') this is the answer
11th Mar 2022, 7:15 PM
K.A.H.Vishwantha
K.A.H.Vishwantha - avatar
0
print('A\nB\nC\nD\n')
4th Aug 2022, 8:03 AM
woshan
0
print("""A B C D""") im putting this but its turning out wrong. like my putput is correct but it saying its incorrect. any help?
8th Aug 2022, 4:10 PM
Gurleen
0
print('A') print('B') print('C') print('D')
19th Dec 2022, 7:01 PM
Ervis Azizolli
Ervis Azizolli - avatar
- 1
print('A\nB\nC\nD\n') here is your answer
20th Jul 2021, 1:02 PM
Clay