19/19 Stuck


#1

I don’t understand what the issue is.
I have refreshed

image


#2

this image is really small, and i can’t enlarge it.

Please copy paste your code to the forum so we can see and run your code


#3
def distance_from_zero(x):
	
	 if type(x) == int or type(x) == float:
       return abs(x)
   
	 else:
	   return "Nope"

#4

i don’t kow what you did, but the indent is messed up for some reason

I re-indented the entire thing here: https://repl.it/languages/python

after doing so, everything worked fine

i don’t know how, and i don’t think i will ever now, but your indent got messed up


#5

Thank you, at least I was not writing out the code wrong.


#6

did you fix the problem by doing all indent again?


#7

I rewrote the whole thing and it still gave me an indentation error so no idea what it was thinking I was doing wrong.


#8

i redid the indent of your code, and everything was fine.

if you still need help, post your code with format:

this way, i now for sure the indent is right

or post it here:

https://repl.it/languages/python

save it, and share the url so i can see the indent of your code


#9

Here is the url https://repl.it/NkvP/0 thanks for looking more into it.


#10

i did the indent on the else line again in repl, here it is:

https://repl.it/NkvP/1

and now its working fine


#11

so strange, no idea what it was thinking but i also erased the indent in else and then re did the indent and it worked. But if you look at them side by side they look identical


#12

yep, this is always difficult. But now the issue is resolved?


#13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.