Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,885 questions

51,811 answers

573 users

How to generate 5 digits random numbers in Python

1 Answer

0 votes
import random

def generate_random_numbers():
    min_value = 10000
    max_value = 99999
    count = 10

    for _ in range(count):
        number = random.randint(min_value, max_value)
        print(number)


generate_random_numbers()


 
'''
run:
 
37076
26514
66498
25908
27635
97857
11758
27705
43458
80755

'''

 



answered Dec 29, 2024 by avibootz

Related questions

1 answer 91 views
1 answer 90 views
1 answer 78 views
1 answer 110 views
1 answer 91 views
1 answer 88 views
1 answer 73 views
...