- 5

What's wrong with this code

print('1. \n2. \n3. \n4. \n5. \n6. \n7. \n8. \n9.')

5th Feb 2021, 11:32 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
46 odpowiedzi
+ 23
print(""" 1. 2. 3. 4. 5. 6. 7. 8. 9.""") solve it using this please upvote
6th Feb 2021, 3:15 AM
Yusuf M Hashmi
+ 3
and that's what you get...
5th Feb 2021, 11:37 PM
visph
visph - avatar
+ 2
No I am in Sololearn module project
6th Feb 2021, 2:26 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 2
Sololearn only
6th Feb 2021, 2:27 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 2
the right answer for your question is here: https://www.sololearn.com/Discuss/2688080/?ref=app you need to remove spaces from your string: print('1.\n2.\n3.\n4.\n5.\n6.\n7.\n8.\n9.')
6th Feb 2021, 3:32 AM
visph
visph - avatar
+ 1
1. 2. 3. 4. 5. 6. 7. 8. 9.
5th Feb 2021, 11:36 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
Not running.
5th Feb 2021, 11:39 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
where and how are you trying to run it?
5th Feb 2021, 11:40 PM
visph
visph - avatar
+ 1
You need to make a program for a leaderboard. The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot: 1. 2. 3. ...
5th Feb 2021, 11:40 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
That's the problem.
5th Feb 2021, 11:40 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
Sololearn
5th Feb 2021, 11:41 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
yes, I guessed the problem... (and I think they expect you to write a loop ^^)
5th Feb 2021, 11:42 PM
visph
visph - avatar
+ 1
It's a module project after lesson
5th Feb 2021, 11:42 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
But where
5th Feb 2021, 11:43 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
They also give a hint.You can use the \n newline character to create line breaks, or, alternatively, create the desired output using three double quotes """.
5th Feb 2021, 11:47 PM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
you should be in a python code playground, where you have to press the run button to run your code: https://code.sololearn.com/c89gMdkSQTAm/?ref=app and you're right: they just expect you to output new lines :) (I don't know why suddently I wasn't able to post in your thread for some times)
6th Feb 2021, 12:43 AM
visph
visph - avatar
+ 1
But what about my project.
6th Feb 2021, 12:46 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
How can I run it
6th Feb 2021, 12:46 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
like you can run the code link I've posted (after you're clicking on it)
6th Feb 2021, 12:47 AM
visph
visph - avatar
+ 1
Please explain I didn't understand.
6th Feb 2021, 1:03 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar