Skip to content

Commit 8e1a3cf

Browse files
authored
added comments in code
1 parent 1499146 commit 8e1a3cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

AutomationScripts/Quotes Automation/quotes_automation.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1+
# install quote library using pip install quote
2+
# import quote from quote library
13
from quote import quote
24
import random
35

46
try:
57
print("Tell me the author or person name?")
68

9+
# taking the name as input to get the quotes related to that author/person
710
q_author = input()
811

12+
# getting the quotes into quotes variable
913
quotes = quote(q_author)
1014

15+
# selecting a random quote from multiple quotes
1116
quote_no = random.randint(1, len(quotes))
1217

18+
# displaying the quote with author name
1319
print("Author: ", quotes[quote_no]['author'])
1420
print("-->", quotes[quote_no]['quote'])
1521

0 commit comments

Comments
 (0)