Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Facebook Engineering Puzzle "Hoppity Hop" - Python Code Bank


Facebook Engineering Puzzle "Hoppity Hop"
This is the first Facebook Engineering Puzzle! http://www.facebook.com/careers/puzzles.php?puzzle_id=7
                file = open('input.txt')
num = file.readline()
for i in range(1, int(num), 1):
    if (i % 3 == 0 and i % 5 == 0):
        print("Hop\n")
    elif(i % 3 == 0):
        print("Hoppity\n")
    elif (i % 5 == 0):
        print("Hophop\n")

            
Comments
Sorry but there are no comments to display