The 365 Data Science team is proud to invite you to our own community forum. A very well build system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

python

python

0
Votes
1
Answer

I have followed the same steps for this functions but it gave me an error 
def add_10(m): 
     if m >= 100: 
       m = m+10 
       return m 
else : 
     return ” save more!” 
when i executed this function i was told that add_10 is not defined . Therefore i would need clarity because i followed all the steps in the video

1 Answer

365 Team
0
Votes

Hi Lambert!
Thanks for reaching out.
It seems that you have used other symbols, not single quotes. Remember that we need single quotes (or double quotes) to indicate a string value.
Please retry with the following code.

def add_10(m): 
    if m >= 100: 
        m = m+10
        return m
    else:
        return "save more!"

Hope this helps.
Best,
Martin

I just used the same quotes that i used before now worked perfect

3 weeks

Great! Thanks for letting us know.

3 weeks