0% found this document useful (0 votes)
2 views2 pages

Python Ragav

The document outlines various functions from the random module in Python, including generating random numbers, shuffling lists, and selecting random choices. It also mentions mathematical functions like absolute value, rounding, and power calculations. Additionally, it includes code snippets for converting temperature units and printing patterns using user-defined symbols.

Uploaded by

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

Python Ragav

The document outlines various functions from the random module in Python, including generating random numbers, shuffling lists, and selecting random choices. It also mentions mathematical functions like absolute value, rounding, and power calculations. Additionally, it includes code snippets for converting temperature units and printing patterns using user-defined symbols.

Uploaded by

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

Functions of random

[Link]()- gives any value random decimal value , integer or whole number
etc.

[Link]()- picks a random choice like when u give list of fooods it gives a
pick.

[Link](cards)- it is a tool to shuffle a list

abs()- absolute value


means that the distance between x and 0

round()- rounding function

pow()- means that power of a certain [Link] pow(4, 3)means 4 power three

inst: Random
seed = _inst.seed
random = _inst.random
uniform = _inst.uniform
triangular = _inst.triangular
randint = _inst.randint
choice = _inst.choice
randrange = _inst.randrange
sample = _inst.sample
shuffle = _inst.shuffle
choices = _inst.choices
normalvariate = _inst.normalvariate
lognormvariate = _inst.lognormvariate
expovariate = _inst.expovariate
vonmisesvariate = _inst.vonmisesvariate
gammavariate = _inst.gammavariate
gauss = _inst.gauss
if sys.version_info >= (3, 12):
binomialvariate = _inst.binomialvariate
betavariate = _inst.betavariate

f to c done
c to f done
k to r done
r to k
r to c
c to r
c to k
k to c
k to f
f to k
f to

paretovariate = _inst.paretovariate
weibullvariate = _inst.weibullvariate
getstate = _inst.getstate
setstate = _inst.setstate
getrandbits = _inst.getrandbits
randbytes = _inst.randbytes

symbol = input("Enter the symbol you wanted to use:")

for i in range(1,6):
for x in range(1,i+1):
print(symbol, end=" ")
print()

for i in reversed(range(1,6)):
for x in reversed(range(1,i+1)):
print(symbol, end=" ")
print()

You might also like