76 957
Assignments Done
Successfully Done
In June 2019

Answer to Question #89077 in Python for josh

Question #89077
Write a method that builds an array by appending a given number of random two-digit integers. It should accept an array and how many values to add as parameters.
Print the array after calling the array.
Sample Run:
How many values to add to the array:
[14, 64, 62, 21, 91, 25, 75, 86, 13, 87, 39, 48]
Expert's answer
from random import randint

def Build_Array(array,count):
  array = [randint(10,99) for i in range(count)]
  return array

count = int(input("How many values to add to the array:\n"))
array = Build_Array([],count)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions