8.

Which of these lines of code will generate a random number between 1 and 50?

input(“1-50”)

print(“1-50”)

import random

num = random.randint(1,50)

The line of code that will generate a random number between 1 and 50 is:

num = random.randint(1,50)