what is the input of below program ??? import random import sys import Mod arg1
ID: 3585560 • Letter: W
Question
what is the input of below program ???
import random
import sys
import Mod
arg1 = int(sys.argv[1])
if arg1 >0 and arg1 <= 1000:
print("Valid seed")
random.seed(arg1)
for x in range(10000):
y = random.random()
if Mod.printForValidNumber(x):
print(y)
print(random.random())
print(random.random())
print(random.random())
print(random.random())
break
##It printed the following:
#Valid seed
#0.6963297431051183
#0.1507136865403378
#0.015356268114414817
#0.6351698482848419
#0.1710703154580019
## result goes here:
def getResult():
# return ''
## Enter your code below here
Explanation / Answer
The valid input to the program in any number betweeb 0 and 1000.
import random
import sys
import Mod
arg1 = int(sys.argv[1])
if arg1 >0 and arg1 <= 1000:
print("Valid seed")
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.