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