-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex5_studyDrill_03.py
More file actions
24 lines (20 loc) · 957 Bytes
/
Copy pathex5_studyDrill_03.py
File metadata and controls
24 lines (20 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#Search online for all of the Python format characters
print "%d : Signed integer decimal"
print "%i : Signed integer decimal"
print "%o : Unsigned octal"
print "%u : Unsigned decimal"
print "%x : Unsigned hexadecimal (lowercase)"
print "%X : Unsigned hexadecimal (uppercase)"
print "%e : Floating point exponential format (lowercase)"
print "%E : Floating point exponential format (uppercase)"
print "%f : Floating point decimal format"
print "%F : Floating point decimal format"
print "%g : Same as 'e' if exponent is grater than -4 or less than precision \
'f' otherwise"
print "%G : Same as 'e' if exponent is grater than -4 or less than precision, \
'F' otherwise"
print "%c : Single characters (accepts integer or single character string)"
print "%r : String (converts any python object using repr())"
print "%s : String (converts any python objetc using str())"
print "% : No arguments is converted, results in a '%' character in the \
result"