Ad

Create a multiply function

Code
Diff
  • // # def multiply (a,b):
    // #     return a * b
    
    function multiply(a, b){
      return a * b;
    }
    
    • // # def multiply (a,b):
    • // # return a * b
    • multiply = (a, b) => a * b;
    • function multiply(a, b){
    • return a * b;
    • }
Code
Diff
  • def test():
        test = []
        i = 0
        while i < 5:
            i += 1
            match i:
                case 1:
                    test.append("t")
                case 2: 
                    test.append("e")
                case 3:
                    test.append("s")
                case 4: 
                    test.append("t")
                    
    
        return ''.join(test)
        
    
    • def test():
    • test = []
    • i = 0
    • while i < 5:
    • i += 1
    • if i == 1:
    • test.append("t")
    • elif i == 2:
    • test.append("e")
    • elif i == 3:
    • test.append("s")
    • elif i == 4:
    • test.append("t")
    • match i:
    • case 1:
    • test.append("t")
    • case 2:
    • test.append("e")
    • case 3:
    • test.append("s")
    • case 4:
    • test.append("t")
    • return ''.join(test)