Ad
Code
Diff
  • def Complicated_Greetings(name):
        h=["H","e","l","l","o"]
        c=","
        w=["W","o","r","l","d"]
        e="!"
        k="".join(h)
        if name=="":
            k+=c
            k+=" "
            k+="".join(w)
            k+=e*2
        else:
            k+=" "
            k+=name
        return k
    • 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
    • k="".join(h)
    • if name=="":
    • k+=c
    • k+=" "
    • for i in w:
    • k+=i
    • k=k+e+e
    • k+="".join(w)
    • k+=e*2
    • else:
    • k+=" "
    • k+=name
    • return k