-3

How can I generate a random real number between 100 and 200 using the random function in Python? The default range is 0-1

Biohacker
  • 15
  • 9

1 Answers1

0

Simply use the random library

import random
print(random.randrange(100,200))
Anuja Barve
  • 256
  • 3
  • 18
  • Thank you for the reply. In fact, I wanted a function that could generate either an integer or a float. Thus, a real number in general. – Biohacker Sep 24 '18 at 13:11