fork download
  1. import os
  2.  
  3. e = 'ta'*156
  4. f = 'at'*156
  5.  
  6. def split_input(string, chunk_size):
  7. num_chunks = len(string)/chunk_size
  8. if (len(string) % chunk_size != 0):
  9. num_chunks += 1
  10. output = []
  11. for i in range(0, int(num_chunks)):
  12. output.append(string[chunk_size * i:chunk_size * (i+1)])
  13. return output
  14.  
  15. def printDna(dna1, dna2, tamanho):
  16. chunks1 = split_input(dna1, tamanho)
  17. chunks2 = split_input(dna2, tamanho)
  18.  
  19. for i in range(0, len(chunks1)):
  20. print(chunks1[i])
  21. print('|'*len(chunks1[i]))
  22. print(chunks2[i])
  23. print
  24.  
  25. rows, columns = os.popen('stty size', 'r').read().split()
  26.  
  27. printDna(e, f, columns)
Runtime error #stdin #stdout #stderr 0.01s 47720KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
stty: standard input: Inappropriate ioctl for device
Traceback (most recent call last):
  File "<builtin>/app_main.py", line 75, in run_toplevel
  File "prog.py", line 25, in <module>
    rows, columns = os.popen('stty size', 'r').read().split()
ValueError: expected length 2, got 0