First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
14
Task/FizzBuzz/Python/fizzbuzz-6.py
Normal file
14
Task/FizzBuzz/Python/fizzbuzz-6.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
>>> ' '.join(''.join(''.join(['' if i%3 else 'F',
|
||||
'' if i%5 else 'B'])
|
||||
or str('00'))
|
||||
for i in range(1,16))
|
||||
'00 00 F 00 B F 00 00 F B 00 F 00 00 FB'
|
||||
>>> _
|
||||
'00 00 F 00 B F 00 00 F B 00 F 00 00 FB'
|
||||
>>> _.replace('FB','11').replace('F','01').replace('B','10').split()[::-1]
|
||||
['11', '00', '00', '01', '00', '10', '01', '00', '00', '01', '10', '00', '01', '00', '00']
|
||||
>>> '0b' + ''.join(_)
|
||||
'0b110000010010010000011000010000'
|
||||
>>> eval(_)
|
||||
810092048
|
||||
>>>
|
||||
Loading…
Add table
Add a link
Reference in a new issue