Ask a New Question

Question

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

(1 point)
Responses

input(“1-50”)

input(“1-50”)

print(“1-50”)

print(“1-50”)

import random

import random

num = random.randint(1,50)
1 year ago

Answers

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

num = random.randint(1, 50)
1 year ago

Related Questions

which of these lines of code will increment a variable? print(variable) count(variable) inc(var... Which of these lines of code will increment a variable? (1 point) Responses print(variable)... Which of these lines of code will increment a variable? (1 point) A. print(variable) B. count(var... Which of these lines of code will result in data inputted by the user that can be used in an addi... Which of these lines of code will print “BBBBB” assuming the program begins with this line of code:l... Put the following lines of code in order to create an algorithm for this situation: if you spend mor... Which of these lines of code will print “BBBBB” assuming the program begins with this line of code:... The following lines of code will create a new .txt file. What will the file contain? (1 point...
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use