Review: Functions:


#1

<Hi there,

Having trouble with Review: Functions code.

Ive looked on the Forum for pointers...and even though I try to make it look like posted code, it's still not working..


`


#2

the if/elif and else should be nested inside the function (hint: indention)


#3

thanks @stetim94
I did the indentation
It came up with this error message..dont quite understand


#4

if you need to return something, i would use the return keyword rather then the print keyword


#5

ive tried that and yet


#6

a function ends the moment a return keyword is reached, so i wouldn't use the return keyword on line 2


#7

i edited--accidently uploaded the wrong screenshot


#8

i also edited my answer:


#9

I switched out "return" to "print" on line 2

i receive this error message

"your function failed on the message yes. It returned 'Sorry' when it should have returned 'Shutting down'


#10

string comparison is case sensitive, 'Yes' == 'yes' would be false. You can also take a moment to take a look after you got a new error message?


#11

Thank you @stetim94 for your help

learned that string comparison is case sensitive--and that did the trick!

thanks again