Ad
Code
Diff
  • def Complicated_Greetings(name):
        hello_part = ["H", "e", "l", "l", "o"] 
        world_part = ["W", "o", "r", "l", "d"]
        space = chr(32)
        comma = chr(44) 
        exclamation = chr(33) 
        two_exclamations = exclamation + exclamation  
        greeting = ""  
        
        for letter in hello_part:
            greeting += letter
            
        # Funny check 
        if len(name) == 0:
            greeting += comma 
            greeting += space 
    
            for letter in world_part:
                greeting += letter
            
            greeting += two_exclamations
        else:
            greeting += space 
            for char in name:
                greeting += char
        return greeting
    #MrQexoWasHere:))
    
    • 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
    • hello_part = ["H", "e", "l", "l", "o"]
    • world_part = ["W", "o", "r", "l", "d"]
    • space = chr(32)
    • comma = chr(44)
    • exclamation = chr(33)
    • two_exclamations = exclamation + exclamation
    • greeting = ""
    • for letter in hello_part:
    • greeting += letter
    • # Funny check
    • if len(name) == 0:
    • greeting += comma
    • greeting += space
    • for letter in world_part:
    • greeting += letter
    • greeting += two_exclamations
    • else:
    • k+=" "
    • k+=name
    • return k
    • greeting += space
    • for char in name:
    • greeting += char
    • return greeting
    • #MrQexoWasHere:))