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:
12
[14, 64, 62, 21, 91, 25, 75, 86, 13, 87, 39, 48]
1
Expert's answer
2019-05-03T10:55:07-0400
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)
print(array)
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment