File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
BasicPythonScripts/Facts Generator Expand file tree Collapse file tree 4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ <b >This is the basic python program which generate interesting facts</b >
2
+ <br >
3
+ <b >Built with</b ><br >
4
+ -Python<br >
5
+ <b >Module Needed</b ><br >
6
+ -randfacts<br >
7
+ <b >Aim</b ><br >
8
+ The aim of the program is to generate random facts using python module {randfacts}.<br >
9
+ <b >Workflow</b ><br >
10
+ <br >
11
+ <b >Step 1:</b > Firstly import randfacts module of python.<br >
12
+ <br >
13
+ <b >Step 2:</b >Then take variable name {n} in which user give number how many facts user needed.<br >
14
+ <br >
15
+ <b >Step 3:</b >Then a for loop which produce {n} interesting facts simultaneously using the loop.<br >
16
+ <br >
17
+ <h4 >Screenshot of the Python script</h4 >
18
+ Awesome_Python_Scripts/BasicPythonScripts/Facts Generator/Images/Output.png
19
+ <br >
20
+ <h4 >Author</h4 >
21
+ <b >Pratima Kushwaha</b >
Original file line number Diff line number Diff line change
1
+ <h3>Module Imported</h3>
2
+ <hr>
3
+ <b>1. randfacts</b>
4
+ <h4>Setup instructions</h4>
5
+ <hr>
6
+ -->To install:randfacts<br>
7
+ run: <b>pip install randfacts</b>
Original file line number Diff line number Diff line change
1
+ import randfacts
2
+ s = 1
3
+ n = int (input ('How many interesting facts yo need???\n ' ))
4
+
5
+ for i in range (n ):
6
+ x = randfacts .getFact (True )
7
+ print (f'{ s } ..{ x } ' )
8
+ s = s + 1
You can’t perform that action at this time.
0 commit comments