Python: Kiíratás#2

import math
print("Szia {} {}!".format("Szabó", "Gazsi"))
print("Szia {vnev} {knev}!".format(knev="Balambér", vnev="Tóth"))

print("Decimális: {0:d}; Hexadecimális: {0:x}; Oktális: {0:o}; Bináris: {0:b}".format(23))
print(1/3)
print("{:.2f}".format(1/3))
print("{:.8f}".format(math.pi))
print("{:.2f}%".format(math.pi))
print("{:0>9}".format(7.534))
print("{:0>5}".format(7))

print("{:<08}".format(4.678))
print("{:,}".format(10000000000)) # vessző használata ezres elválasztóként

SUB = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉")
SUP = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹")
print("H2SO4".translate(SUB))
print("a2 + b2 = c2".translate(SUP))

print("\N{GREEK SMALL LETTER PI}r\N{SUPERSCRIPT TWO}")
print("\N{GREEK CAPITAL LETTER OMEGA}r\N{SUBSCRIPT TWO}")

print("10{}".format('\u00B2'))

print(u"H\u2082SO\u2084")
print("x\u00b2 + y\u00b2 = r\u00b2")


'''
 		0	1	2	3	4	5	6	7	8	9	A	B	C	D	E	F
U+00Bx	 	 	x²	x³	 	 	 	 	 	x¹	 	 	 	 	 	 
U+207x	x⁰	xⁱ	 	 	x⁴	x⁵	x⁶	x⁷	x⁸	x⁹	x⁺	x⁻	x⁼	x⁽	x⁾	xⁿ
U+208x	x₀	x₁	x₂	x₃	x₄	x₅	x₆	x₇	x₈	x₉	x₊	x₋	x₌	x₍	x₎	 
U+209x	xₐ	xₑ	xₒ	xₓ	xₔ	xₕ	xₖ	xₗ	xₘ	xₙ	xₚ	xₛ	xₜ
'''
a=3
print(a,"m\u00B2")
print(a,"m\u00B3")
print("m","\u207F", sep="")