Ad

Isn't it easier to understand, if you write it like that?

Code
Diff
  • const isDivisible = (n, a, b) => n % a == 0 && n % b == 0;
    
    • const isDivisible = (n,a,b, truth = n % a === 0 && n % b === 0) => truth;
    • const isDivisible = (n, a, b) => n % a == 0 && n % b == 0;

Isn't it easier to do it like so?

Code
Diff
  • def print_statements():
        # Printing lines of code:
        # [print(x) for x in ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]]
        data = ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]
        list(map(print, data))
    • def print_statements():
    • # Printing lines of code:
    • [print(x) for x in ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]]
    • # [print(x) for x in ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]]
    • data = ["Hello Mark!","This is my first python script.","Python will be fun to learn!","I am not at COGS","I am at home in my jammies."]
    • list(map(print, data))