Answers for "wikipedia with python"

2

how to make wikipedia using python

please subscribe my channel - https://bit.ly/2Me2CfB

import wikipedia

word = str(input("ENTER THE WORD : "))

print("WHAT DO YOU WANT TO GET OF THE WORD YOU ENTERED : ")
print(":\t1\tSummary")
print(":\t2\tExamples")
print(":\t3\tEssay")
choice = int(input("ENTER YOUR CHOICE : "))
if choice == 1:
    print(word, " :")
    wki1 = wikipedia.summary(word)
    print(wki1)
elif choice == 2:
    print(word, " :")
    wki2 = wikipedia.search(word)
    print(wki2)
elif choice == 3:
    print(word, " :")
    wki3 = wikipedia.page(word)
    print(wki3)
else:
    print("INVALID CHOICE!!")
Posted by: Guest on July-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language