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 real-world problem this program (below) is trying its BEST to simulate?
import random
array =[]
s=[]
array[0]=(input())
input())
input())
array[3]=(input())
input())
s[0]= random, randint (0,9)
s[1]= random. randint (0,9)
s[2]= random. randint (0,9)
s[3]= random. randint (0,9)
s[4]= random. randint (0,9)
count =0
for n in range (0,5) :
if (array[n]==s[n]):
count+=1
if (count 5):
print("Winner")
exit() #This will stop and exit the program
print("Loser")
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.
 A student wrote a program but it has bad variable naming

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!