#!/usr/bin/env python3 #-*- encoding: utf-8 -*- import sys while True: p = int(input("Enter penguin: ")) print("Position: ", p & 63) print("Nb moves: ", (p >> 6) & 63) print("Nb moves A: ", (p >> 12) & 7) print("Nb moves B: ", (p >> 15) & 7) print("Nb moves C: ", (p >> 18) & 7) print("Nb moves D: ", (p >> 21) & 7) print("Nb moves E: ", (p >> 24) & 7) print("Nb moves F: ", (p >> 27) & 7)