File tree 3 files changed +7
-1
lines changed
BasicPythonScripts/Facts Generator
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 4
4
-Python<br >
5
5
<b >Module Needed</b ><br >
6
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.
7
10
<b >Aim</b ><br >
8
11
The aim of the program is to generate random facts using python module {randfacts}.<br >
9
- <b >Workflow </b ><br >
12
+ <b >Compilation Steps </b ><br >
10
13
<br >
11
14
<b >Step 1:</b > Firstly import randfacts module of python.<br >
12
15
<br >
Original file line number Diff line number Diff line change
1
+ #importing randfacts module of python
1
2
import randfacts
2
3
s = 1
4
+ #variable n define how many facts needed
3
5
n = int (input ('How many interesting facts yo need???\n ' ))
4
6
7
+ #for loop which give random facts simultaneously
5
8
for i in range (n ):
6
9
x = randfacts .getFact (True )
7
10
print (f'{ s } ..{ x } ' )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments