Optional, default, and variadic parameters

F-VARIADIC-V4-2medium

Keep an explicit zero

The worker has three small entry points used by the same report delivery flow. First summarize a player’s submitted scores, including an empty submission. Then resolve each queued job’s attempt option, keeping an explicit opt-out of 0. Finally forward a batch to the existing send helper so the channel receives one notice per message, followed by an accurate sent count.

What needs to change

Repair attempts and its call in main so only a missing count becomes 3.

Reproduce

  1. Use go run on the mixed-jobs input and compare the audit line with the expected stdout.

Acceptance criteria

Your review marks · Saved in this browser. Test acceptance is tracked separately.

Notes

The file contains its imports, readRows, attempts and main. The call in main may need to change with the function.

Input: a job name, optionally followed by its count.

An optional count is a nonnegative whole number in the supplied small range; malformed fields are outside this task.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in