python weirdness i guess

hi all,
i know this is prolly a stupid question(maybe) but considering im just a newbie i think u guys wont take me wrong(Hoping lol)…
ok going straight to the point heres what i got:
def greeting(x):
return 'Whats up ’ + x
print greeting(‘Noobish boy’)

after pressing enter nothing happens and it interprets as the function/definition whatever is not finished yet so only after double pressing enter it goes to this part >>
then i have to type again print greeting(‘Noobish boy’) in order to make it display the greeting stuff…why does that happen? it seems that it doesnt trigger the action til i press 2 times enter and then type the last line again…

other thing is when i type the function like this :
def greeting(x):
return 'Whats up ’ + x
print greeting(‘Noobish boy’)

note that the print is not at the beggining of the line and it still gives me error,and i know how to read the errors but for me it doesnt make sense ,since print is already pink and not yellow colour ¬¬
any help here is greatly appreciated!
Kind regards,
Newbie

You are probably doing it this way:

def greeting(x):
  return 'Whats up ' + x
  print greeting('Noobish boy')

You should do it this way (note the indentation):

def greeting(x):
  return 'Whats up ' + x
print greeting('Noobish boy')

oops i just noticed both examples look just the same in my post lol and i dont know how to go advanced when creating a thread…i might try to look into it more closely later and follow an advice that someone posted in another thread(sorry i forgot the name lol ill look it up later =/)…
thanks for the advice Sniffix im going to try that and if my memory is correct i think i ve already tried that…anyways brb with the results!
Kind regards,
Newbie

yeah i knew it i just had a feeling that i wasted a thread Duh…
just noticed that on my notes(notepad) i made a mistake and i should’ve watched the video again to see what was wrong before posting…anyways just delete this thread =/
Yours,
Newbie