fork download
  1. def draw_heart():
  2. for row in range(6):
  3. for col in range(7):
  4. if (row == 0 and col % 3 != 0) or (row == 1 and col % 3 == 0) or (row - col == 2) or (row + col == 8):
  5. print("*", end="")
  6. else:
  7. print(" ", end="")
  8. print()
  9.  
  10. draw_heart()
  11.  
Success #stdin #stdout 0.04s 9236KB
stdin
Standard input is empty
stdout
 ** ** 
*  *  *
*     *
 *   * 
  * *  
   *