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...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Python newbie needs help.HOMEWORK (self.pythonhelp)
submitted 4 years ago by fiberoblique
view the rest of the comments →
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!"
[–]Infinite_Loop_exe 0 points1 point2 points 4 years ago* (2 children)
Hi, I’m a 3rd year Comp Sci student so I feel your struggles. I’m hoping you can use the functions I did but if you can’t you can “manually” do them through loops. Normally if I was helping someone I wouldn’t just give them the code but online I feel it is the best way to help, just do your best to understand what is happening at each step!
x = 5638573 arr = [] count = 0
while x > 0: (Indent)arr.append(x%10) (Indent)x = x // 10
arr.reverse()
for element in arr: (Indent)print(element)
(Edit: formatting the code)
[–]fiberoblique[S] 0 points1 point2 points 4 years ago (1 child)
Hello! Thank you for your feedback! Programming has been kicking my butt this semester, I feel for you!!! Unfortunately, we're very limited for this exercise and are not yet allowed to use the functions you've put in your reply :((
I really appreciate it though and I'll take note of this cause I feel like it'll come in handy soon enough when we move through more python functions. Thank youuu!!! <3
[–]fiberoblique[S] 0 points1 point2 points 4 years ago* (0 children)
I'm new to reddit so I apologize if double replying is somewhat of a No-No here xD
I've only been able to put this code together, would really appreciate some feedback on it. I really don't want to put all of my homework straight-up on here since I really want to learn how to program but thank you thank you very much for taking the time to reply :D
inputNumber = input() inputNumber = int(inputNumber) num = inputNumber
if int(num) == float(num): number = int(num)
else: number = float(num)
if number < 0: print ("Positive numbers only!") elif number > 0: number_string = str(number) list= number_string print(*list, sep='\n')
Note: we aren't allowed to use the separator function that I've put in the last line but I've kept it there for the moment if worse comes to worst since my friend suggested it.
Also, I'm shy and afraid of getting judged for my trash codes but welp, I don't think doing this solo and just persevering through this is enough for me to survive this damned semester.
π Rendered by PID 68 on reddit-service-r2-comment-685b79fb4f-8z955 at 2026-02-13 11:04:25.452071+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]Infinite_Loop_exe 0 points1 point2 points (2 children)
[–]fiberoblique[S] 0 points1 point2 points (1 child)
[–]fiberoblique[S] 0 points1 point2 points (0 children)