fork download
  1. def net(x, i=0, result=''):
  2. if i == x + 1:
  3. return result
  4. if i in (0, x // 2, x):
  5. result += '+ - - - - + - - - - +\n'
  6. else:
  7. result += '| | |\n'
  8. return net(x, i + 1, result)
  9.  
  10.  
  11. print(net(10))# your code goes here
Success #stdin #stdout 0.02s 9944KB
stdin
Standard input is empty
stdout
+ - - - - + - - - - +
|         |         |
|         |         |
|         |         |
|         |         |
+ - - - - + - - - - +
|         |         |
|         |         |
|         |         |
|         |         |
+ - - - - + - - - - +