1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# import module import random as r ph_no = [] # the first number should be in the range of 6 to 9 ph_no.append(r.randint(6, 9)) # the for loop is used to append the other 9 numbers. # the other 9 numbers can be in the range of 0 to 9. for i in range(1, 10): ph_no.append(r.randint(0, 9)) # printing the number for i in ph_no: print(i, end="") |
Related posts:
- Python 3 Script to Generate Random String of Specific Length and Characters Using String and Random Module Full Project For Beginners
- Python 3 Matplotlib Library to Generate Random Color Hexadecimal Codes and Plot in Graph Using Random Full Project For Beginners
- Javascript Program to Generate a Random Number Between Two Numbers in Javascript Using Math.random() Method Full Project For Beginners
- Java Program to Generate Random Numbers Using Random() Method Full Example Project For Beginners
- PHP 7 Script to Detect Website Visitor Mobile Device and Mobile Browser Full Project For Beginners
- Join 7 React Native Whatsapp Group Link For Mobile React Native Developers in 2021 | React Native Whatsapp Group Links For React Native Developers | Whatsapp Group Links For React Native Mobile App Programmers
- Join 11 React Native Forum Whatsapp Group Link For Mobile React Native Web Developers in 2021 | React Native Whatsapp Group Links For React Native Web Developers | Whatsapp Group Links For React Native Mobile App Programmers
- Join 8 Kotlin Android Whatsapp Group Link For Mobile Android Developers in 2021 | Kotlin Whatsapp Group Links For Android Mobile Developers | Whatsapp Group Links For Kotlin Android Programmers
- Join 4 Kotlin Android Whatsapp Group Link For Mobile Android Developers in 2021 | Kotlin Whatsapp Group Links For Android Mobile Developers | Whatsapp Group Links For Kotlin Android Programmers
- Join 100+ Node.js and Android Whatsapp Group Invite Links For Web and Mobile Developers in 2021 | 100 Whatsapp Groups For Web and Mobile Programmers and Coders
- Python 3 Script to Get Mobile Number Country Name and Service Provider Information Using phonenumbers Module Full Project For Beginners
- PHP 7 Script to Generate Random String by Shuffling String Using str_shuffle() Method Full Project For Beginners
- PHP 7 Script to Generate Random CSS Hexadecimal Color Code Using md5() Function Full Project For Beginners
- Python 3 Numpy Library Example to Generate Random Number Arrays (One + Two + Three Dimensional) Full Project For Beginners
- Python 3 PyTorch Library Example to Generate Random Tensor Number Values and Specific Shape and Range Full Tutorial For Beginners
- Python Tkinter GUI Script to Built a Secure Random Password Generator Desktop App Using Random Library Full Project For Beginners
- Python Tkinter GUI Script to Build a Complex Random Password Generator Using Random and pyperclip Library
- Python 3 Tkinter Random Password Generator With Three Difficulty Levels and Dynamic Length Using Random Library GUI Desktop App Full Project For Beginners
- Python 3 Random Secure Password Generator With Icon Using Random and Pyperclip Library GUI Desktop App Full Project For Beginners
- Python Tkinter GUI Random First Name and Last Name and Username Generator Desktop App Using Random Library Full Project For Beginners