|
9 | 9 |
|
10 | 10 | # Created by Joseph C. Richardson |
11 | 11 |
|
12 | | -import os;os.system('title fibonary bits in action!'.title()) |
| 12 | +import os;os.system('title fibonary bits in action! 2'.title()) |
13 | 13 | from time import sleep as delay |
14 | 14 |
|
15 | 15 | red='\x1b[31m' |
|
19 | 19 | purple='\x1b[35m' |
20 | 20 | white='\x1b[37m' |
21 | 21 |
|
22 | | -title_text=f'fibonary bits in action!'.title(),'fibonacci natural number sequence'.title() |
23 | | -text=(' binary digits: ',' octal digits: ',' hexadecimal digits: ',' decimal digits:', |
24 | | - 'fibonacci digits: '.title()) |
| 22 | +title_text=f'fibonary bits in action! 2'.title(),'fibonacci natural number sequence'.title() |
| 23 | +text=(' binary digits: ',' octal digits: ',' hexadecimal digits: ',' decimal digits:',' fibonacci digits: '.title()) |
25 | 24 |
|
26 | 25 | lb='\n';lbb='\n\n';elb=' =\n';eq=' = ';sp=' ' |
27 | 26 |
|
|
39 | 38 | b=f'{num3:b}';o=f'{num3:o}' |
40 | 39 | x=f'{num3:X}';d=f'{num3:d}' |
41 | 40 |
|
42 | | -# f' string formated print() function: |
| 41 | +# f' string formatted print() function example: |
43 | 42 |
|
44 | 43 | print(f'{white}{lb}{sp*16}{title_text[0]}{lb}{red}{lb}{sp*4}{len(b)}{green}{text[0].title()}'+\ |
45 | | - f'{yellow}{b}{blue}{elb}{sp*4}{green}{red}{len(o)}{green}{text[1].title()}{yellow}'+\ |
| 44 | + f'{yellow}{b}{blue}{elb}{sp*3} {green}{red}{len(o)}{green}{text[1].title()}{yellow}'+\ |
46 | 45 | f'{o}{blue}{elb}{sp*4}{green}{red}{len(x)}{green}{text[2].title()}{yellow}{x}'+\ |
47 | 46 | f'{blue}{eq}{green}{lb}{sp*4}{red}{len(d)}{green}{text[3].title()}{blue}{eq}{yellow}'+\ |
48 | | - f'{d}{lbb}{white}{sp*11}{title_text[1]}{lbb}{green}{sp*4}{text[4]}{yellow}{num3:,}') |
| 47 | + f'{d}{lbb}{white}{sp*11}{title_text[1]}{lbb}{green}{sp*3}{text[4]}{yellow}{num3:,d}') |
49 | 48 | delay(pause) |
0 commit comments