17,973 views
3 votes
3 votes
Which of the following will assign a random number in the range of 1 through 50 to the variable number?

a. random(1,50) = number
b. number = random.randint(1, 50)
c. randint(1, 50) = number
d. number = random(range(1, 50))

User Rcollyer
by
3.0k points

1 Answer

8 votes
8 votes

Answer: B. number = random.randit (1, 50)

User Fostah
by
2.8k points