File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Python/fake_name_generator Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+
3
+ ## Introduction
4
+ This is the python script to generate fake names using faker library
5
+
6
+ ## Setup
7
+
8
+ 1 . Open terminal/cmd.
9
+
10
+ 2 . Navigate to folder where you downloaded the faker script.
11
+
12
+ 3 . Enter the following command.
13
+
14
+ pip3 install -r"requirements.txt"
15
+
16
+ 4 . After all the required libraries are installed sucessfully we can run script.
17
+
18
+
19
+ ## Using script
20
+ * `` python app.py ``
21
+
22
+ * Then enter number of names that you want to generate
23
+
24
+
25
+ ## Output
26
+
27
+ ![ Screenshot (211)] ( https://user-images.githubusercontent.com/48166328/96716521-c420d000-13c2-11eb-8ff0-0fc83b5ef4fd.png )
28
+
29
+
Original file line number Diff line number Diff line change
1
+ # Importing faker library that helps us in generating fake data
2
+ from faker import Faker
3
+
4
+ # Creating instance for faker library
5
+ fake = Faker ()
6
+
7
+ # Tanking number of names that user want to generate as input
8
+ n = int (input ("Enter how many name you want to generate: " ))
9
+
10
+ # We will be using for loop to generate fake names
11
+ for i in range (n ):
12
+ print (fake .name ())
Original file line number Diff line number Diff line change
1
+ faker
You can’t perform that action at this time.
0 commit comments