0% found this document useful (0 votes)
44 views1 page

A A Aaaaaaaaaaaaaaa Ryyy Yaaaaaaa A An NNNNNNNNN

The document provides Python code snippets for generating random numbers within specified ranges using the random module. It includes examples for generating a single random number between 50 and 100, as well as between 75 and 125, using both random.random() and random.randint(). Additionally, it demonstrates generating five random numbers between 50 and 100.

Uploaded by

afbbscomplab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

A A Aaaaaaaaaaaaaaa Ryyy Yaaaaaaa A An NNNNNNNNN

The document provides Python code snippets for generating random numbers within specified ranges using the random module. It includes examples for generating a single random number between 50 and 100, as well as between 75 and 125, using both random.random() and random.randint(). Additionally, it demonstrates generating five random numbers between 50 and 100.

Uploaded by

afbbscomplab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

INPUT OUTPUT

import random Random Number between 50 and 100 is


#1 85
print("Random Number between 50 and 100 Random Number between 50 and 100 is
is") 93
for i in range(1):
print(int([Link]()*(100 - 50) + 50))

#2
print("Random Number between 50 and 100
is")
for i in range(1):
print(int([Link](50, 100)))

INPUT OUTPUT
import random Random Number between 75 and 125 is
#1 68
print("Random Number between 75 and 125 Random Number between 75 and 125 is
is") 98
for i in range(1):
print(int([Link]()*(125 - 75) + 50))

#2
print("Random Number between 75 and 125
is")
for i in range(1):
print(int([Link](75, 125)))

INPUT OUTPUT
import random
print("5 Random Numbers between 50 and 5 Random Numbers between 50 and 100 are
100 are") 91.73043316751443
for i in range(5): 66.92991900262501
print([Link]() * 50 + 50) 83.75611646880304
85.1652842923698
96.86874911930366

#W.A.P. to generate a random number between (i) 50 and 100 using random
and randit function (ii) between 75 and 125
By: Vilaksh Bhargava

You might also like