0

# generate random number ,c

write a program to generate a 5-digit random number each time than subtract one unit form each of the larger 5 digits for example: 24754 Become>>>24654 Or 86219 Become>>>75218

5 Answers

0

you can try random module

0

import random
numbers = ["0" , "1" , "2" , "3", "4", "5", "6", "7" , "8" , "9"]
x = random.choice (numbers)
print(x)

0

but you must enter length of number

0

in python

0

âșâșâșâș it is just random
i want
58724 >>57624
Or
97769 >>86658