Last answered:

31 Dec 2019

Posted on:

30 Dec 2019

0

python

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 answers ( 0 marked as helpful)
Instructor
Posted on:

31 Dec 2019

0
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

Submit an answer