#!/usr/bin/env python3; import Utils # Begin Main a = 326 b = -1 c = 2015 i1 = 65000 i2 = -2 i3 = 3261963 f1 = 3.1415926 f2 = 2.99792458e9 f3 = 1.234e-4 c1 = ord("A"[0]) c2 = ord("B"[0]) c3 = ord("C"[0]) s1 = "Apples" s2 = "and" s3 = "Bananas" b1 = True b2 = False s = Utils.sprintf("Decimals: %d %d %d", a, b, c) print(s) s = Utils.sprintf("Hexadecimals: %#x %#x %#x", a, b, c) print(s) s = Utils.sprintf("Long Decimals: %d %d %d", i1, i2, i3) print(s) s = Utils.sprintf("Long Hexadecimals: %016x %016x %016x", i1, i2, i3) print(s) s = Utils.sprintf("Fixed FP: %f %f %f", f1, f2, f3) print(s) s = Utils.sprintf("Exponential FP: %e %e %e", f1, f2, f3) print(s) s = Utils.sprintf("General FP: %g %g %g", f1, f2, f3) print(s) s = Utils.sprintf("General FP with precision: %.2g %.2g %.2g", f1, f2, f3) print(s) s = Utils.sprintf("Boolean: %s %s", b1, b2) print(s) s = Utils.sprintf("Character: %c %c %c", c1, c2, c3) print(s) s = Utils.sprintf("String: %s %s %s", s1, s2, s3) print(s)