You need to develop a list of five random integers between 1 and 100. Which of the following examples will achieve this result?

Group of answer choices

randvals = [random.randint(1,100) for i in range(0,6)]

print(randvals)

import random

randvals = [random.random(1,100) for i in range(0,5)]

print(randvals)

import random

randvals = [random.randint(1,100) for i in range(1,6)]

print(randvals)

import random

randvals = [random.randint(1,100) for i in range(1,5)]

print(randvals)

1 answer

The first example will achieve this result:

randvals = [random.randint(1,100) for i in range(0,6)]

print(randvals)
Similar Questions
  1. Please help!! I don't know what to do! tysm if u answer!!Which would not be an appropriate way to generate 10 random integers to
    1. answers icon 2 answers
  2. Planting Depth(in)|Height (in)3 |5 6 |9 6 |18 6 |8 7 |21 6 |12 4 |12 ----------------------------------------- a.Write the
    1. answers icon 1 answer
  3. What is the effect of calling random.shuffle() on a list?Select one: a. The items in the list are re-ordered randomly b. The
    1. answers icon 1 answer
    1. answers icon 1 answer
more similar questions