Skip to content

Instantly share code, notes, and snippets.

View hamzafarooq's full-sized avatar

Hamza Farooq hamzafarooq

  • Sunnyvale, California
View GitHub Profile
import numpy as np
def powerof2(num):
if num <= 0:
return False
if num == 1:
return True
max = int(round(num/2,0))
j=0
for i in range(max+1):
if i*i==num: