Ad
Code
Diff
  • print(
        chr(72) +
        chr(101) +
        2 * chr(108) +
        chr(111) +
        chr(44) +
        chr(32) +
        chr(87) +
        chr(111) +
        chr(114) +
        chr(108) +
        chr(100) +
        2 * chr(33)
    )
    • Hletter = "H"
    • eletter = "e"
    • lletter1 = "l"
    • lletter2 = "l"
    • oletter = "o"
    • comma = ","
    • space = " "
    • Wletter = "W"
    • oletter2 = "o"
    • rletter = "r"
    • lletter3 = "l"
    • dletter = "d"
    • exclam1 = "!"
    • exclam2 = "!"
    • print(Hletter + eletter + lletter1 + lletter2 + oletter + space + comma + space + Wletter + oletter2 + rletter + lletter3 + dletter + space + exclam1 + exclam2)
    • print(
    • chr(72) +
    • chr(101) +
    • 2 * chr(108) +
    • chr(111) +
    • chr(44) +
    • chr(32) +
    • chr(87) +
    • chr(111) +
    • chr(114) +
    • chr(108) +
    • chr(100) +
    • 2 * chr(33)
    • )
Code
Diff
  • is_even = lambda x: not x % 2
    • is_even = lambda x: x % 2 == 0
    • is_even = lambda x: not x % 2
Code
Diff
  • even_or_odd = lambda n: "Odd" if n % 2 else "Even"
    • def even_or_odd(n):
    • return ("Even", "Odd")[n % 2]
    • even_or_odd = lambda n: "Odd" if n % 2 else "Even"