Skip to content

Instantly share code, notes, and snippets.

View mgill25's full-sized avatar
:electron:

Manish Gill mgill25

:electron:
View GitHub Profile
#!/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):

R - NaeblisEcho

@mgill25
mgill25 / CracklePop.py
Created April 21, 2022 13:18
Crackle Pop
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