R - NaeblisEcho
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
def bin(x): | |
return "{0:b}".format(x) | |
def rs_one(x): | |
""" Right Shift by 1 """ | |
return x >> 1 | |
def ls_one(x): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gen_pop(limit): | |
for num in range(1, limit): | |
if num % 3 == 0 and num % 5 == 0: | |
yield "CracklePop" | |
elif num % 3 == 0: | |
yield "Crackle" | |
elif num % 5 == 0: | |
yield "Pop" | |
else: | |
yield num |
OlderNewer