How am i wrong if my result matches the expected output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How am i wrong if my result matches the expected output?

The task states: "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 You can use either \n or three quotes to add new lines inside the given string." Here's how i tried to complete the task: https://ibb.co/N99tzwH The given code was just one line, "print('A B C D')"

29th Dec 2023, 1:13 PM
Igor Matić
Igor Matić - avatar
8 Answers
+ 4
It is good you have Python Core in your list. Personally I think Python Core is difficult than the new courses, yet the new courses are beginner friendly. I suspected your code failed because it contains extra space after each letter. Test cases is very strict on every lesson. An extra space, comma or mixing up upper / lower cases will fail the test. Try to remove the space in your code and try again.
29th Dec 2023, 2:10 PM
Wong Hei Ming
Wong Hei Ming - avatar
+ 3
That course is no longer maintained and has been removed. You probably joined it some time ago and that's why it is available to you. The current Python courses are 'Introduction to Python', 'Python Intermediate', and 'Python Developer' which is the previously mentioned courses combined.
29th Dec 2023, 1:38 PM
Keith
Keith - avatar
+ 2
Can you post the course and lesson name?
29th Dec 2023, 1:25 PM
Keith
Keith - avatar
+ 2
Igor Matić I'm in the 7 year club myself and there have been many changes 👍
29th Dec 2023, 2:40 PM
Keith
Keith - avatar
+ 1
Igor Matić , The great thing about Python Core is the build up of many great informative comments over the years. You can learn more from them than from the course. Unfortunately, "All those comments will be lost, like tears in rain."
30th Dec 2023, 10:32 AM
Rain
Rain - avatar
0
The lesson is called Newlines, the task is in the second-to-last part. Python Core course.
29th Dec 2023, 1:30 PM
Igor Matić
Igor Matić - avatar
0
@Wong Hei Ming, removing spaces has solved it, thank you.
29th Dec 2023, 2:25 PM
Igor Matić
Igor Matić - avatar
0
@Keith, i was out of the loop regarding this platform for a long time, due to life reasons, so i was not familiar with so many changes. I started this course some 7 years ago.
29th Dec 2023, 2:27 PM
Igor Matić
Igor Matić - avatar