Question: A student wrote a program but it has bad variable naming conventions AND they forgot to add comments to describe most of it ! Can
A student wrote a program but it has bad variable naming conventions AND they forgot to add comments to describe most of it
Can you determine what realworld problem this program below is trying its BEST to simulate?
import random
array
array
input
input
array
input
random, randint
random. randint
random. randint
random. randint
random. randint
count
for in range :
if arrayn:
count
if count :
printWinner
exit #This will stop and exit the program
printLoser
It simulates the distribution of winnings in an auction.
It simulates ferrying animals across a river.
It simulates a lottery.
It simulates a game of poker.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
