Ad
Fundamentals
Restricted
Code
Diff
  • is_even=lambda*x:not(x[len("")]%(True+True))
    • is_even=lambda*x:not(x[int()]&True)
    • is_even=lambda*x:not(x[len("")]%(True+True))
Fundamentals
Restricted
Code
Diff
  • is_even=lambda*x:not(x[False]%(True+True))
    • is_even=lambda*x:~x[False]&True
    • is_even=lambda*x:not(x[False]%(True+True))
Code
Diff
  • p=1
    • p=lambda x:x
    • p=1
Code
Diff
  • pepito=1
    • pepito = lambda x:x
    • pepito=1
Code
Diff
  • def time_out():pass
    • # you know if this will time out by pressing the 'TDD' button.
    • def time_out():
    • while True:pass
    • def time_out():pass
Code
Diff
  • days=lambda m,d:(__import__("datetime").datetime(2022,m,d)-__import__("datetime").datetime(2022,1,1)).days + 1
    • def days(month,day):
    • return sum([31,28,31,30,31,30,31,31,30,31,30,31][:month-1])+day
    • days=lambda m,d:(__import__("datetime").datetime(2022,m,d)-__import__("datetime").datetime(2022,1,1)).days + 1
Code
Diff
  • days=lambda m,d:(__import__("datetime").datetime(2022,m,d)-__import__("datetime").datetime(2022,1,1)).days + 1
    • from datetime import datetime as dt
    • days=lambda m,d:(dt(2022,m,d)-dt(2022,1,1)).days + 1
    • days=lambda m,d:(__import__("datetime").datetime(2022,m,d)-__import__("datetime").datetime(2022,1,1)).days + 1
Code
Diff
  • kube=lambda *l:__import__("numpy").prod(l)
    • def kube(x, y, z):
    • #your code here
    • return x*y*z
    • kube=lambda *l:__import__("numpy").prod(l)
Code
Diff
  • kube=lambda *l:{abs(l[0]*l[1]*l[2]):l[0]*l[1]*l[2]}.get(l[0]*l[1]*l[2],0)
    • def kube(x, y, z):
    • if x * y * z > 0:
    • return x*y*z
    • if x * y * z < 0:
    • return 0
    • kube=lambda *l:{abs(l[0]*l[1]*l[2]):l[0]*l[1]*l[2]}.get(l[0]*l[1]*l[2],0)
Code
Diff
  • kube=lambda *l:max(l[0]*l[1]*l[2],0)
    • def kube(x, y, z):
    • if x * y * z > 0:
    • return x*y*z
    • if x * y * z < 0:
    • return 0
    • kube=lambda *l:max(l[0]*l[1]*l[2],0)
Code
Diff
  • class cuboid:
        def __init__(self, *l):
            self.vol=l[0]*l[1]*l[2]
            
        def volume(self):
            return self.vol
    • class cuboid:
    • def __init__(self, a, b, c):
    • self.a = a
    • self.b = b
    • self.c = c
    • def __init__(self, *l):
    • self.vol=l[0]*l[1]*l[2]
    • def volume(self):
    • return self.a*self.b*self.c
    • return self.vol
Code
Diff
  • class cube:
        def __init__(self, a, b, c):
            self.vol=a*b*c
            
        volume=lambda self: self.vol
    • class cube:
    • def __init__(self, a, b, c):
    • self.a = a
    • self.b = b
    • self.c = c
    • self.vol=a*b*c
    • def volume(self):
    • return self.a*self.b*self.c
    • volume=lambda self: self.vol
Code
Diff
  • kube=lambda *l:l[0]*l[1]*l[2]
    
    • def kube(x, y, z):
    • #your code here
    • return x*y*z
    • kube=lambda *l:l[0]*l[1]*l[2]
Code
Diff
  • from datetime import datetime as dt
    days=lambda m,d:(dt(2022,m,d)-dt(2022,1,1)).days + 1
    • from datetime import datetime
    • def days(month,day):
    • return (datetime(2022, month, day) - datetime(2022, 1, 1)).days + 1
    • from datetime import datetime as dt
    • days=lambda m,d:(dt(2022,m,d)-dt(2022,1,1)).days + 1
Fundamentals
Restricted
Code
Diff
  • is_even=lambda*x:x[False]%(True+True)==False
    • is_even=lambda*x:~x[False]&True
    • is_even=lambda*x:x[False]%(True+True)==False
Loading more items...