Explain difference between random and randint?

Explain difference between random and randint?
  • 3 answers

Elsker Elvish 1 month, 3 weeks ago

random.random() function generates random number between the range 0 to 1 while random.randint(from_range, to_range) return a random number between the given range. Hope it helped!
The random command will generate a rondom value present in a given list/dictionary. And randint command will generate a random integer value from the given list/dictionary.

Afsana Elliyas 2 months ago


Related Questions:

  • 1 answers
How to create libraries
  • 0 answers
14+13%15 In python
  • 2 answers

myCBSEguide App


Trusted by 1 Crore+ Students

CBSE Test Generator

Create papers in minutes

Print with your name & Logo

Download as PDF

3 Lakhs+ Questions

Solutions Included

Based on CBSE Blueprint

Best fit for Schools & Tutors

Work from Home

  • Work from home with us
  • Create questions or review them from home

No software required, no contract to sign. Simply apply as teacher, take eligibility test and start working with us. Required desktop or laptop with internet connection