fork(1) download
  1. # your code goes here
  2. #code
  3. print(' '*9+'*')
  4. for i in range(9):
  5. line_empty = list(' '*(9-i))
  6. line_zero = list('0'*(i*2+1))
  7. for j in range(len(line_zero)):
  8. if j%2 == 0:
  9. line_zero[j] = '^'
  10. print(''.join(line_empty+line_zero))
Success #stdin #stdout 0.02s 27664KB
stdin
Standard input is empty
stdout
         *
         ^
        ^0^
       ^0^0^
      ^0^0^0^
     ^0^0^0^0^
    ^0^0^0^0^0^
   ^0^0^0^0^0^0^
  ^0^0^0^0^0^0^0^
 ^0^0^0^0^0^0^0^0^