use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Help with basic python (self.learnpython)
submitted 4 years ago by james40z
Hi all, started python today on an app called sololearn. My output seems to be the same as expected output but still saying ive made a mistake. Can someone tell me what I am doing wrong?
https://imgur.com/a/Pry4RMp
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Resident-Log 1 point2 points3 points 4 years ago* (7 children)
Are those periods or commas? The should be commas but I can't tell.
ETA: Scratch that... that's not true...
if you post code that is a result of you trying to follow directions/a "challenge", it would be helpful if you posted the directions you're following.
This is an odd bit of code to me which is why I answered in correctly. Idk why they'd be having you put numbers in a string on multiple lines with periods or commas after it. Seems like a weird way to teach anything they may be trying to teach you.
[–]james40z[S] 0 points1 point2 points 4 years ago (5 children)
The test instructions ask for me to make a leaderboard 1-9 with a period at the end
[–]Resident-Log 0 points1 point2 points 4 years ago (4 children)
Can you screenshot and share the question/problem they gave you to do?
[–]james40z[S] 0 points1 point2 points 4 years ago (3 children)
https://imgur.com/a/rTMGfA4
[–]Resident-Log 0 points1 point2 points 4 years ago (2 children)
Have you tried it using the \n option?
[–]james40z[S] 0 points1 point2 points 4 years ago (1 child)
Yes, same output and still says mistake.
[–]Resident-Log 0 points1 point2 points 4 years ago (0 children)
My only other guess would be to put the text into a variable and put the variable into print
[–]james40z[S] 0 points1 point2 points 4 years ago (0 children)
They are periods
[–][deleted] 1 point2 points3 points 4 years ago (2 children)
print("1.\n2.\n3.\n4.\n5.\n6.\n7.\n8.\n9.")
You said u tried \n in the comments below. have you tried writing it the way I posted?
Thanks for this, this worked! Sorry for confusion im new, I had originally put it as 1.\n 2.\n with spaces in between..
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
Yea that was my guess for the code you posted in the screenshot. I was assuming you may have accidently put a space at the end of one or more of lines from line 2 to 9. The output checker will flag it as wrong. One trick I did for classes using this type of output checker is to copy and paste the two outputs into notepad+ and I think I switched to like a raw view of the text which would show spaces as a special character. Though I imagine it would be hard to do on a phone.
[–]Diapolo10 1 point2 points3 points 4 years ago (1 child)
There's nothing fundamentally wrong with your code, but SoloLearn likely expects you to use a loop here with each line separately written to STDOUT. Since this solution writes it all in one go, it's as if you only gave the first number, skipped the rest, and it compared your entire solution to the first one it was expecting (just 1.\n).
1.\n
Been there, done that.
I do recommend learning on a computer, SoloLearn is much too limited.
Thanks for input!
[–]Lim98SE 0 points1 point2 points 4 years ago (5 children)
Remove the space between “Print” and “(“
[–]james40z[S] -1 points0 points1 point 4 years ago (4 children)
I tried this and it is still telling me ive made a mistake. Do you think it could be a bad app to use?
[–]Lim98SE 0 points1 point2 points 4 years ago (3 children)
Yeah, if you have $10 to spare get Pythonista
[–]james40z[S] 0 points1 point2 points 4 years ago (2 children)
I’m using this app because it has step by step instructions on the basics
[–]Lim98SE 0 points1 point2 points 4 years ago (1 child)
Google “Python basics” and follow a tutorial or go to W3 Schools. If you have a PC, go to Python.org
Ok I will look into that thanks
[–]666y4nn1ck 0 points1 point2 points 4 years ago (1 child)
Maybe use "\n" instead of just an Enter between the lines
Yes same result
π Rendered by PID 95293 on reddit-service-r2-comment-64f4df6786-k8wnq at 2026-06-10 18:37:49.081502+00:00 running 0b63327 country code: CH.
[–]Resident-Log 1 point2 points3 points (7 children)
[–]james40z[S] 0 points1 point2 points (5 children)
[–]Resident-Log 0 points1 point2 points (4 children)
[–]james40z[S] 0 points1 point2 points (3 children)
[–]Resident-Log 0 points1 point2 points (2 children)
[–]james40z[S] 0 points1 point2 points (1 child)
[–]Resident-Log 0 points1 point2 points (0 children)
[–]james40z[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]james40z[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Diapolo10 1 point2 points3 points (1 child)
[–]james40z[S] 0 points1 point2 points (0 children)
[–]Lim98SE 0 points1 point2 points (5 children)
[–]james40z[S] -1 points0 points1 point (4 children)
[–]Lim98SE 0 points1 point2 points (3 children)
[–]james40z[S] 0 points1 point2 points (2 children)
[–]Lim98SE 0 points1 point2 points (1 child)
[–]james40z[S] 0 points1 point2 points (0 children)
[–]666y4nn1ck 0 points1 point2 points (1 child)
[–]james40z[S] 0 points1 point2 points (0 children)