Ad
Fundamentals
Code
Diff
  • def hello_message():
        return 'Hello World!'
    
    
    
        
    • def hello_message():
    • msg = 'Hello World!'
    • return msg
    • return 'Hello World!'
Code
Diff
  • import math
    def factorial(n):
        return math.factorial(n)
    • import math
    • def factorial(n):
    • return 1 if n == 0 else eval('*'.join([str(i) for i in range(1, n+1)]))
    • return math.factorial(n)