Python nethack calculator