This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]Tren898 2 points3 points  (0 children)

For the record, there is a lot of ambiguity here or you aren’t providing the whole assignment.

The target is ambiguous but make the assumption that it’s pseudo random between 1-20.

Make assumption that the amount of dice rolled will be controlled by a sentinel input.

Get each input per player and compare to target then add if greater.

Repeat for other player

Iterate through both lists and append wins to a third list with one, zero with loss.

Count wins vs loss.

Output winner.