File tree 5 files changed +42
-0
lines changed
BasicPythonScripts/Facts Generator
GUIScripts/Wikipedia Summary
5 files changed +42
-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 >Purpose</b >
8
+ <br >
9
+ The purpose of this script to get the random facts from python using randfacts module of python.
10
+ <b >Aim</b ><br >
11
+ The aim of the program is to generate random facts using python module {randfacts}.<br >
12
+ <b >Compilation Steps</b ><br >
13
+ <br >
14
+ <b >Step 1:</b > Firstly import randfacts module of python.<br >
15
+ <br >
16
+ <b >Step 2:</b >Then take variable name {n} in which user give number how many facts user needed.<br >
17
+ <br >
18
+ <b >Step 3:</b >Then a for loop which produce {n} interesting facts simultaneously using the loop.<br >
19
+ <br >
20
+ <h4 >Screenshot of the Python script</h4 >
21
+ Awesome_Python_Scripts/BasicPythonScripts/Facts Generator/Images/Output.png
22
+ <br >
23
+ <h4 >Author</h4 >
24
+ <b >Pratima Kushwaha</b >
Original file line number Diff line number Diff line change
1
+ #importing randfacts module of python
2
+ import randfacts
3
+ s = 1
4
+ #variable n define how many facts needed
5
+ n = int (input ('How many interesting facts yo need???\n ' ))
6
+
7
+ #for loop which give random facts simultaneously
8
+ for i in range (n ):
9
+ x = randfacts .getFact (True )
10
+ print (f'{ s } ..{ x } ' )
11
+ s = s + 1
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>
File renamed without changes.
You can’t perform that action at this time.
0 commit comments