A

Admin • 832.70K Points
Coach

Q. How can you generate a random integer between 1 and 10?

  • (A) random.randint(1, 10)
  • (B) random.random(1, 10)
  • (C) random.randint(10)
  • (D) random.randomint(1, 10)
  • Correct Answer - Option(A)
  • Views: 18
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

`random.randint(a, b)` returns random integer between a and b inclusive.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.