You need to sign in or sign up before continuing.×
Ad
Code
Diff
  • def Complicated_Greetings(name):
        if name:
            return 'Hello ' + name
        return 'Hello, World!!'
    • def Complicated_Greetings(name):
    • h=["H","e","l","l","o"]
    • c=","
    • w=["W","o","r","l","d"]
    • e="!"
    • k=""
    • for i in h:
    • k+=i
    • if name=="":
    • k+=c
    • k+=" "
    • for i in w:
    • k+=i
    • k=k+e+e
    • else:
    • k+=" "
    • k+=name
    • return k
    • if name:
    • return 'Hello ' + name
    • return 'Hello, World!!'