Ad
Code
Diff
  • def Complicated_Greetings(name):
        if name == "":
            return 'Hello, World!!'
        return f'Hello {name}'
    • 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, World!!'
    • return f'Hello {name}'