#!/usr/bin/python
# -*- coding: utf8 -*-
# Soubor:  20111115-Tue-tabulka.py
# Datum:   15.11.2011 08:15
# Autor:   Marek Nožka, nozka <@t> spseol <d.t> cz
# Licence: GNU/GPL 
# Úloha:   tisk tabulky
# Popis:   vzorová úloha na ukázku formátování


print """/{0:s}\\
|          Tabulka
\\{1:s}/
| {2:4s} | {3:8s} | {4:>6s} | {5:4s} |{6:s}|
{7}""".format(37*'-', 37*'-','dec','bin','oct','hex', 'chr',39*'-')


i = 32
while i<127:
    print "| {0:4d} | {1:08b} | {2:>06o} | {3:4X} | {4:s} |"\
            .format(i,i,i,i, chr(i) )
    i += 1
print "\\{0:s}/".format(37*'-')


i=1.23456789
print "{0:10.3f} {1:10.3e} {2:10.3g}".format(i,i*i,0.000000314)


