Why is the number a str?

Code
Diff
  • def flip_the_number(num):
        return ''.join(reversed(num))
  • 11
    def flip_the_number(num):
    
    2
        return num[::-1]
    
    2+
        return ''.join(reversed(num))
    
Fundamentals
Code
Diff
  • using System;
    
    public class Kata
        {
            public static int Opposite(int n)
            {
                return -n;
            }
        }
  • 11
    using System;
    
    22
    33
    public class Kata
    
    44
        {
    
    5
            public  static int Opposite(int number)
    
    5+
            public static int Opposite(int n)
    
    66
            {
    
    7
                return -number;
    
    7+
                return -n;
    
    88
            }
    
    99
        }
    

Kumite shouldn't count comment markers and comments as lines of code.

Code
Diff
  • // 
  • 1
    console.log("<PASSED::>");
    
    1+
    // 
    
Code
Diff
  • def returnhundred(*_):
        return 100
        
  • 11
    def returnhundred(*_):
    
    2
        return True*10**2
    
    2+
        return 100
    
    33
        
    
Code
Diff
  • def returnhundred(*_):
        return True*10**2
        
  • 1
    def returnhundred(s):
    
    2
        return (True + True + True + True + True + True + True + True + True + True) ** (True + True)
    
    1+
    def returnhundred(*_):
    
    2+
        return True*10**2
    
    33
        
    
Code
Diff
  • switchout = str.replace
  • 1
    def switchout(sentence, word, switch):
    
    2
        return sentence.replace(word, switch)
    
    1+
    switchout = str.replace
    
Code
Diff
  • switchout = lambda *_: " g F e D c B a "
  • 1
    def switchout(sentence,switchout,word):
    
    2
        return sentence.replace(switchout,word)
    
    1+
    switchout = lambda *_: " g F e D c B a "