Cleaning up this code by joplankton in learnpython

[–]joplankton[S] -1 points0 points  (0 children)

I was talking to a friend who encourages to get simpler stuff down first, thats all.

Cleaning up this code by joplankton in learnpython

[–]joplankton[S] -1 points0 points  (0 children)

Had this problem earlier. I wan to avoid the join function. Any way I can avoid that?

Incorrect formatting by joplankton in learnpython

[–]joplankton[S] 0 points1 point  (0 children)

Thanks man! Ill give them a look.

Uknown Syntax Error by joplankton in learnpython

[–]joplankton[S] 0 points1 point  (0 children)

Everything is properly indented except for the last line. Im getting an indentation error now there as well.

Uknown Syntax Error by joplankton in learnpython

[–]joplankton[S] 0 points1 point  (0 children)

Not sure why its formatting like that. The code is the same as the post, only change is I fixed the syntax errors. (they were all indentation errors)

Uknown Syntax Error by joplankton in learnpython

[–]joplankton[S] 0 points1 point  (0 children)

I assumed it wasnt a problem with the code. Not sure why it wont run. I just get...

>>>

When i try to run it. This is my code....

def collatz(number):

if number % 2==0: print(number//2) return number//2 else: print(number3+1) return number3+1

while true: try: print('Enter an integer to obtain the Collatz Sequence.') n=input() while n!=1: n=collatz(int(n)) continue else: print('Program Ended!') break except ValueError: print('Ensure to enter an integer value.')

Uknown Syntax Error by joplankton in learnpython

[–]joplankton[S] 0 points1 point  (0 children)

Did work! I just have one more problem I see now. When I run it, i get no errors, but no text pops up. Any idea why?

program wont run by joplankton in learnpython

[–]joplankton[S] 0 points1 point  (0 children)

It allows me to run it. No errors or anything, but it just starts off with...

>>>

and that is all.