Create program that has a function that takes in three arguments and prints one integer. Your random seed should be set to 42. The first argument should correspond to the size of a np.randint that has values from 0 to 10.
The second is an integer that you will multiply the randint by.
The third argument is a value you will index the result of the multiplication by.
You will print the integer that was indexed as ‘Your random value is x’ where x = the result of the indexing. The program should not crash if the third value is larger than the first.
what i have so far:
import numpy as np
import pandas as pd
np.random.seed(42)
x = np.random.randint(0,10)
y = int(input('a integer:'))
second = x*y
i do not know where to go from here, the indexing part is confusing me any help? thanks all
Aucun commentaire:
Enregistrer un commentaire